Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8357c3158 | ||
|
|
b5e421cf25 | ||
|
|
ed7989a280 | ||
|
|
c053a74d69 | ||
|
|
1f0207a5ee | ||
|
|
798cc33add | ||
|
|
459a007596 | ||
|
|
140cc3f523 | ||
|
|
d60b38582f | ||
|
|
021844ef0a | ||
|
|
2057a610fb | ||
|
|
2c7e468d22 | ||
|
|
a71c4e7f34 | ||
|
|
ef1e1a373e | ||
|
|
81bba2885d | ||
|
|
a488775097 | ||
|
|
56b10b4a99 | ||
|
|
1253dfaaca | ||
|
|
9a34660ce4 | ||
|
|
2ca9cadc8a | ||
|
|
220e070f0b | ||
|
|
038193024d | ||
|
|
84c733ad9f | ||
|
|
3ac28f7f17 | ||
|
|
c420e3c6a0 | ||
|
|
c3df48465a | ||
|
|
5f22022580 | ||
|
|
87125987b1 | ||
|
|
e784a84f10 | ||
|
|
deebf03c84 | ||
|
|
532f95942a | ||
|
|
8fab0f1c39 | ||
|
|
270a3a64c3 | ||
|
|
8e6a6c2dc5 | ||
|
|
995f0c7f2c | ||
|
|
d2871c992a | ||
|
|
03b7a214df | ||
|
|
98f5d1e2a7 | ||
|
|
bf0ddc881d | ||
|
|
68e9cdf109 | ||
|
|
8a157e4204 | ||
|
|
eb16f01ad9 | ||
|
|
06beb22c1f | ||
|
|
da5dbd24f8 | ||
|
|
b142884ec7 | ||
|
|
ce8a2b7cf9 | ||
|
|
409f3844fd | ||
|
|
3faf9bfd81 | ||
|
|
cf3e236c69 | ||
|
|
96b1306739 | ||
|
|
688502cf36 | ||
|
|
2862225e2d | ||
|
|
16cb760cfc | ||
|
|
935b3780f5 | ||
|
|
2c7856f642 | ||
|
|
7c62608519 | ||
|
|
87c5baa263 | ||
|
|
795d9b9072 | ||
|
|
18e91d95c9 | ||
|
|
7f9c203453 | ||
|
|
282bc49258 | ||
|
|
e9a38b15d7 | ||
|
|
dff03f98d0 | ||
|
|
186a0ebab9 | ||
|
|
abee440e12 | ||
|
|
5a0683d199 | ||
|
|
e7d1d86978 | ||
|
|
6f0cb55658 | ||
|
|
2b1b3f418c | ||
|
|
8ab81c3e5e | ||
|
|
6b2512886a | ||
|
|
7fb10ca819 | ||
|
|
e7d59bf471 | ||
|
|
237d00acab | ||
|
|
c0b827bca1 | ||
|
|
6832ca1833 | ||
|
|
9a78500206 | ||
|
|
27465cd89d | ||
|
|
8d6425aa01 | ||
|
|
b85d0ca019 | ||
|
|
ae5377f0e6 | ||
|
|
e00f8fffb4 | ||
|
|
d4531744c4 | ||
|
|
663a10f2d2 | ||
|
|
322e4cc983 | ||
|
|
8c1d3f43fe | ||
|
|
91dd1d0196 | ||
|
|
14b08a8727 | ||
|
|
ce039c33eb | ||
|
|
8e3037d38d | ||
|
|
f86798a45b | ||
|
|
25eeee9d34 | ||
|
|
5324f1a061 | ||
|
|
8df46f0dbe | ||
|
|
5dbd7c06aa | ||
|
|
51d534d330 | ||
|
|
33a32413f0 | ||
|
|
77bd580615 | ||
|
|
4abf10fd69 | ||
|
|
bbbee76cfe | ||
|
|
451d27d7df | ||
|
|
440e0f4edb | ||
|
|
e1bc94fc5a | ||
|
|
480d5b9403 | ||
|
|
6560ecedf7 | ||
|
|
c4894ff3c1 | ||
|
|
227d03fbd7 | ||
|
|
d9b1f7ccb7 | ||
|
|
27a77c9545 | ||
|
|
53bff8d618 |
@@ -8,3 +8,5 @@ node_modules/
|
||||
*.db-wal
|
||||
*.db
|
||||
cloudflared.exe
|
||||
scratch/
|
||||
|
||||
|
||||
@@ -22,12 +22,18 @@
|
||||
"homepage": "https://github.com/pampo32-hub/recreopay#readme",
|
||||
"dependencies": {
|
||||
"better-sqlite3": "^13.0.3",
|
||||
"compression": "^1.8.2",
|
||||
"cors": "^2.8.6",
|
||||
"express": "^5.2.1",
|
||||
"imap-simple": "^5.1.0",
|
||||
"jsqr": "^1.4.0",
|
||||
"mailparser": "^3.9.36",
|
||||
"nodemailer": "^10.1.0",
|
||||
"pg": "^8.23.1",
|
||||
"puppeteer-core": "^25.12.0",
|
||||
"qrcode": "^1.5.4",
|
||||
"synckit": "^0.11.13",
|
||||
"web-push": "^3.6.7"
|
||||
"web-push": "^3.6.7",
|
||||
"xlsx": "^0.18.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
[{
|
||||
"relation": ["delegate_permission/common.handle_all_urls"],
|
||||
"target": {
|
||||
"namespace": "android_app",
|
||||
"package_name": "com.sibopay.twa",
|
||||
"sha256_cert_fingerprints": ["A5:ED:D0:0A:24:5F:96:93:15:DE:D9:24:42:BD:43:00:AE:0A:65:5A:B0:88:EA:CC:94:E9:A7:98:C5:23:26:9B"]
|
||||
}
|
||||
}]
|
||||
@@ -0,0 +1,878 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Structured Flow — App de Agenda y Recordatorios Visuales</title>
|
||||
<script src="https://www.gstatic.com/antigravity/web/dev/tailwindcss.min.js"></script>
|
||||
<style>
|
||||
* {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.no-scrollbar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
.no-scrollbar {
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.theme-transition {
|
||||
transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
|
||||
}
|
||||
|
||||
/* Cápsula móvil estilo Structured */
|
||||
.structured-pill {
|
||||
border-radius: 32px;
|
||||
box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.07), inset 0 1.5px 1px rgba(255, 255, 255, 0.85);
|
||||
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
|
||||
}
|
||||
.structured-pill:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.1), inset 0 1.5px 1px rgba(255, 255, 255, 0.95);
|
||||
}
|
||||
.structured-pill:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
/* Tarea del Timeline */
|
||||
.timeline-task {
|
||||
border-radius: 26px;
|
||||
box-shadow: 0 6px 20px -3px rgba(0, 0, 0, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.8);
|
||||
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
.timeline-task.completed {
|
||||
opacity: 0.65;
|
||||
filter: saturate(0.7);
|
||||
}
|
||||
.timeline-task.completed .task-title {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
/* Conector puzzle */
|
||||
.puzzle-joint {
|
||||
width: 26px;
|
||||
height: 22px;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Marco del teléfono */
|
||||
.iphone-frame {
|
||||
box-shadow:
|
||||
0 0 0 12px #0f172a,
|
||||
0 0 0 14px #334155,
|
||||
0 25px 60px -15px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
/* Animación de check */
|
||||
@keyframes check-pop {
|
||||
0% { transform: scale(0.7); }
|
||||
50% { transform: scale(1.2); }
|
||||
100% { transform: scale(1); }
|
||||
}
|
||||
.animate-pop {
|
||||
animation: check-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body id="pageBody" class="theme-transition min-h-screen bg-[#e8f4fc] text-slate-800 p-3 sm:p-6 md:p-8 flex flex-col items-center justify-start font-sans">
|
||||
|
||||
<!-- TOP BAR DEL PROTOTIPO -->
|
||||
<header class="w-full max-w-5xl mx-auto mb-6 flex flex-col md:flex-row items-center justify-between gap-4 bg-white/70 backdrop-blur-xl p-4 md:px-6 rounded-3xl border border-white/80 shadow-xs">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded-2xl bg-gradient-to-tr from-sky-600 via-cyan-500 to-emerald-400 flex items-center justify-center text-white font-extrabold text-xl shadow-md">
|
||||
⚡
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-xl font-black tracking-tight text-slate-900">flow</span>
|
||||
<span class="text-[11px] font-bold uppercase tracking-wider px-2.5 py-0.5 rounded-full bg-sky-100 text-sky-800 border border-sky-200">
|
||||
Agenda & Recordatorios • Estilo Structured
|
||||
</span>
|
||||
</div>
|
||||
<p class="text-xs text-slate-500 font-medium">Timeline visual de tareas y carrusel de rutinas en colores pastel</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SELECTOR DE COLOR PASTEL Y VISTA -->
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<!-- Selector de fondo de la app -->
|
||||
<div class="flex items-center gap-1.5 bg-white/90 p-1.5 rounded-2xl border border-slate-200 shadow-xs">
|
||||
<span class="text-[11px] font-semibold text-slate-500 pl-1.5">Fondo:</span>
|
||||
<button onclick="changeTheme('#e0f2fe', '#e8f4fc', 'Cielo Pastel')" title="Cielo Pastel" class="w-6 h-6 rounded-full bg-[#e0f2fe] border-2 border-sky-400 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
<button onclick="changeTheme('#d1fae5', '#e6f8f0', 'Menta Fresca')" title="Menta Fresca" class="w-6 h-6 rounded-full bg-[#d1fae5] border-2 border-emerald-400 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
<button onclick="changeTheme('#ffedd5', '#fef3e7', 'Melocotón')" title="Melocotón" class="w-6 h-6 rounded-full bg-[#ffedd5] border-2 border-orange-400 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
<button onclick="changeTheme('#f3e8ff', '#f7f0fe', 'Lavanda')" title="Lavanda" class="w-6 h-6 rounded-full bg-[#f3e8ff] border-2 border-purple-400 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
<button onclick="changeTheme('#fef9c3', '#fefde8', 'Vainilla')" title="Vainilla" class="w-6 h-6 rounded-full bg-[#fef9c3] border-2 border-amber-400 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
<button onclick="changeTheme('#ffffff', '#f1f5f9', 'Nieve')" title="Blanco Puro" class="w-6 h-6 rounded-full bg-white border-2 border-slate-300 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
</div>
|
||||
|
||||
<!-- Botón Nueva Tarea en el simulador -->
|
||||
<button onclick="openNewTaskModal()" class="px-4 py-2 rounded-2xl bg-slate-900 hover:bg-sky-600 text-white text-xs font-bold shadow-sm transition-all flex items-center gap-1.5 cursor-pointer active:scale-95">
|
||||
<span>+ Nueva Tarea</span>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- CONTENEDOR PRINCIPAL -->
|
||||
<main class="w-full max-w-5xl flex flex-col lg:flex-row items-center justify-center gap-8 lg:gap-12">
|
||||
|
||||
<!-- FRAME DEL CELULAR CON LA APP (IPHONE 16 PRO) -->
|
||||
<div id="phoneShell" class="iphone-frame relative w-[390px] h-[812px] bg-slate-950 rounded-[52px] p-3 flex flex-col shrink-0 select-none overflow-hidden transition-all duration-500">
|
||||
|
||||
<!-- PANTALLA INTERNA DEL SMARTPHONE -->
|
||||
<div id="appViewport" class="theme-transition relative w-full h-full bg-[#e0f2fe] rounded-[42px] overflow-hidden flex flex-col justify-between">
|
||||
|
||||
<!-- STATUS BAR & DYNAMIC ISLAND -->
|
||||
<div class="relative pt-3 pb-1 px-7 flex items-center justify-between z-40 text-slate-800 font-semibold text-xs tracking-tight">
|
||||
<span>9:41</span>
|
||||
|
||||
<!-- DYNAMIC ISLAND CON NOTIFICACIÓN DE PRÓXIMA TAREA -->
|
||||
<div onclick="showAppToast('Próxima: Enfoque Profundo a las 10:00 AM')" class="w-28 h-7 bg-black rounded-full flex items-center justify-between px-2.5 shadow-inner cursor-pointer active:scale-95 transition-transform">
|
||||
<div class="w-2.5 h-2.5 rounded-full bg-emerald-400 animate-pulse"></div>
|
||||
<span class="text-[10px] text-white/90 font-medium tracking-wide">flow app</span>
|
||||
<div class="w-2.5 h-2.5 rounded-full bg-sky-400"></div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-1.5 text-slate-800">
|
||||
<svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="currentColor"><path d="M12 3c-4.97 0-9 4.03-9 9 0 2.12.74 4.07 1.97 5.61L12 22l7.03-4.39C20.26 16.07 21 14.12 21 12c0-4.97-4.03-9-9-9z"/></svg>
|
||||
<div class="w-5 h-2.5 border border-slate-700 rounded-sm p-0.5 flex items-center">
|
||||
<div class="w-full h-full bg-slate-800 rounded-2xs"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTENIDO SCROLLABLE DE LA APP -->
|
||||
<div id="appContentScroll" class="flex-1 overflow-y-auto no-scrollbar pb-24 px-4 pt-1">
|
||||
|
||||
<!-- HEADER DE LA APP (DÍA Y PROGRESO) -->
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div>
|
||||
<span class="text-[11px] font-bold tracking-wider uppercase text-sky-900/70 block">
|
||||
viernes, 10 de octubre
|
||||
</span>
|
||||
<h1 class="text-xl font-black text-slate-900 tracking-tight lowercase">
|
||||
mi agenda de hoy
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<!-- CHIP DE PROGRESO DEL DÍA -->
|
||||
<div class="bg-white/80 backdrop-blur-md px-3 py-1.5 rounded-2xl border border-white/90 shadow-xs flex items-center gap-2">
|
||||
<div class="w-7 h-7 rounded-full bg-sky-100 flex items-center justify-center font-bold text-xs text-sky-800">
|
||||
<span id="progressPercent">50%</span>
|
||||
</div>
|
||||
<div class="flex flex-col text-left">
|
||||
<span class="text-[9px] uppercase font-bold text-slate-400">completado</span>
|
||||
<span id="progressCount" class="text-xs font-black text-slate-800">2 de 4</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SELECTOR DE FECHAS EN PÍLDORAS HORIZONTALES (ESTILO STRUCTURED) -->
|
||||
<div class="flex items-center gap-2 overflow-x-auto no-scrollbar py-1 mb-4 text-xs font-semibold">
|
||||
<button onclick="selectDate(this, 'Jue 9')" class="px-3.5 py-1.5 rounded-full bg-white/70 hover:bg-white text-slate-700 shrink-0 border border-white/80 lowercase transition-all cursor-pointer">
|
||||
jue 9
|
||||
</button>
|
||||
<button onclick="selectDate(this, 'Hoy 10')" class="px-4 py-1.5 rounded-full bg-slate-900 text-white shadow-xs shrink-0 lowercase cursor-pointer">
|
||||
hoy 10
|
||||
</button>
|
||||
<button onclick="selectDate(this, 'Sáb 11')" class="px-3.5 py-1.5 rounded-full bg-white/70 hover:bg-white text-slate-700 shrink-0 border border-white/80 lowercase transition-all cursor-pointer">
|
||||
sáb 11
|
||||
</button>
|
||||
<button onclick="selectDate(this, 'Dom 12')" class="px-3.5 py-1.5 rounded-full bg-white/70 hover:bg-white text-slate-700 shrink-0 border border-white/80 lowercase transition-all cursor-pointer">
|
||||
dom 12
|
||||
</button>
|
||||
<button onclick="selectDate(this, 'Lun 13')" class="px-3.5 py-1.5 rounded-full bg-white/70 hover:bg-white text-slate-700 shrink-0 border border-white/80 lowercase transition-all cursor-pointer">
|
||||
lun 13
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- ========================================================== -->
|
||||
<!-- EL CARRUSEL DE LA APP: RUTINAS Y PLANTILLAS DE RECORDATORIO -->
|
||||
<!-- ========================================================== -->
|
||||
<div class="mb-5">
|
||||
<div class="flex items-center justify-between mb-2 px-1">
|
||||
<div>
|
||||
<span class="text-[10px] font-bold tracking-wider uppercase text-sky-900/80">plantillas & hábitos</span>
|
||||
<h3 class="text-sm font-extrabold text-slate-900 tracking-tight lowercase">
|
||||
rutinas conectadas
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<!-- Mini botones de navegación del carrusel -->
|
||||
<div class="flex items-center gap-1.5">
|
||||
<button onclick="scrollAppCarousel(-1)" class="w-6 h-6 rounded-full bg-white/80 hover:bg-white border border-white flex items-center justify-center text-slate-700 shadow-2xs active:scale-90 transition-all cursor-pointer">
|
||||
‹
|
||||
</button>
|
||||
<button onclick="scrollAppCarousel(1)" class="w-6 h-6 rounded-full bg-white/80 hover:bg-white border border-white flex items-center justify-center text-slate-700 shadow-2xs active:scale-90 transition-all cursor-pointer">
|
||||
›
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TRACK CON TARJETAS CÁPSULA Y CONECTORES DE ROMPECABEZAS -->
|
||||
<div class="relative overflow-hidden py-1.5 -mx-4 px-4">
|
||||
<div id="agendaCarouselTrack" class="flex items-center overflow-x-auto no-scrollbar scroll-smooth snap-x snap-mandatory py-1" style="scroll-padding-left: 16px;">
|
||||
|
||||
<!-- ================= TARJETA 1 (PASTEL SKY) ================= -->
|
||||
<div class="structured-pill snap-start shrink-0 w-[285px] h-[148px] bg-[#e0f2fe] p-4 flex flex-col justify-between relative cursor-pointer border border-sky-200/50" onclick="insertRoutineToTimeline('🌅 Rutina Mañanera', '07:00 AM', '45 min', '#e0f2fe', '☕', 'Café, meditación y lectura de 10 páginas')">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-8 h-8 rounded-full bg-white/90 shadow-2xs flex items-center justify-center text-base">
|
||||
🌅
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-sky-950 uppercase tracking-tight">hábito diario</span>
|
||||
</div>
|
||||
<span class="text-[10px] font-black px-2 py-0.5 rounded-full bg-sky-200 text-sky-900 lowercase">
|
||||
45 min
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="text-sm font-extrabold text-slate-900 tracking-tight leading-snug lowercase">
|
||||
rutina mañanera
|
||||
</h4>
|
||||
<p class="text-[11px] text-slate-600 line-clamp-1 font-medium mt-0.5">
|
||||
café, 10 min meditación y journaling
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between pt-1">
|
||||
<span class="text-[11px] font-bold text-sky-900">07:00 am</span>
|
||||
<button class="px-3 py-1 rounded-full bg-slate-900 hover:bg-sky-600 text-white text-[11px] font-bold transition-all shadow-xs flex items-center gap-1">
|
||||
<span>agendar</span>
|
||||
<span>+</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR PUZZLE 1 (Sky a Mint) -->
|
||||
<div class="puzzle-joint">
|
||||
<svg width="26" height="22" viewBox="0 0 26 22" fill="none">
|
||||
<path d="M0 0 H11 C11 5.5, 16 5.5, 16 11 C16 16.5, 11 16.5, 11 22 H0 Z" fill="#e0f2fe"/>
|
||||
<path d="M11 0 H26 V22 H11 C11 16.5, 16 16.5, 16 11 C16 5.5, 11 5.5, 11 0 Z" fill="#d1fae5"/>
|
||||
<path d="M11 0 C11 5.5, 16 5.5, 16 11 C16 16.5, 11 16.5, 11 22" stroke="rgba(0,0,0,0.06)" stroke-width="1.5"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<!-- ================= TARJETA 2 (PASTEL MINT) ================= -->
|
||||
<div class="structured-pill snap-start shrink-0 w-[285px] h-[148px] bg-[#d1fae5] p-4 flex flex-col justify-between relative cursor-pointer border border-emerald-200/50" onclick="insertRoutineToTimeline('⚡ Enfoque Profundo', '10:00 AM', '90 min', '#d1fae5', '💻', 'Bloque de trabajo sin celular ni interrupciones')">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-8 h-8 rounded-full bg-white/90 shadow-2xs flex items-center justify-center text-base">
|
||||
⚡
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-emerald-950 uppercase tracking-tight">productividad</span>
|
||||
</div>
|
||||
<span class="text-[10px] font-black px-2 py-0.5 rounded-full bg-emerald-200 text-emerald-900 lowercase">
|
||||
90 min
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="text-sm font-extrabold text-slate-900 tracking-tight leading-snug lowercase">
|
||||
enfoque profundo (deep work)
|
||||
</h4>
|
||||
<p class="text-[11px] text-slate-600 line-clamp-1 font-medium mt-0.5">
|
||||
cero notificaciones, proyecto principal
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between pt-1">
|
||||
<span class="text-[11px] font-bold text-emerald-900">10:00 am</span>
|
||||
<button class="px-3 py-1 rounded-full bg-emerald-900 hover:bg-emerald-800 text-white text-[11px] font-bold transition-all shadow-xs flex items-center gap-1">
|
||||
<span>agendar</span>
|
||||
<span>+</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR PUZZLE 2 (Mint a Peach) -->
|
||||
<div class="puzzle-joint">
|
||||
<svg width="26" height="22" viewBox="0 0 26 22" fill="none">
|
||||
<path d="M0 0 H11 C11 5.5, 16 5.5, 16 11 C16 16.5, 11 16.5, 11 22 H0 Z" fill="#d1fae5"/>
|
||||
<path d="M11 0 H26 V22 H11 C11 16.5, 16 16.5, 16 11 C16 5.5, 11 5.5, 11 0 Z" fill="#ffedd5"/>
|
||||
<path d="M11 0 C11 5.5, 16 5.5, 16 11 C16 16.5, 11 16.5, 11 22" stroke="rgba(0,0,0,0.06)" stroke-width="1.5"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<!-- ================= TARJETA 3 (PASTEL PEACH) ================= -->
|
||||
<div class="structured-pill snap-start shrink-0 w-[285px] h-[148px] bg-[#ffedd5] p-4 flex flex-col justify-between relative cursor-pointer border border-orange-200/50" onclick="insertRoutineToTimeline('🏃♂️ Ejercicio & Salud', '05:30 PM', '60 min', '#ffedd5', '🏋️', 'Rutina de pesas o cardio al aire libre')">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-8 h-8 rounded-full bg-white/90 shadow-2xs flex items-center justify-center text-base">
|
||||
🏃♂️
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-orange-950 uppercase tracking-tight">bienestar</span>
|
||||
</div>
|
||||
<span class="text-[10px] font-black px-2 py-0.5 rounded-full bg-orange-200 text-orange-900 lowercase">
|
||||
60 min
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="text-sm font-extrabold text-slate-900 tracking-tight leading-snug lowercase">
|
||||
sesión de entrenamiento
|
||||
</h4>
|
||||
<p class="text-[11px] text-slate-600 line-clamp-1 font-medium mt-0.5">
|
||||
rutina funcional y estiramiento activo
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between pt-1">
|
||||
<span class="text-[11px] font-bold text-orange-900">05:30 pm</span>
|
||||
<button class="px-3 py-1 rounded-full bg-orange-950 hover:bg-orange-900 text-white text-[11px] font-bold transition-all shadow-xs flex items-center gap-1">
|
||||
<span>agendar</span>
|
||||
<span>+</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR PUZZLE 3 (Peach a Lavender) -->
|
||||
<div class="puzzle-joint">
|
||||
<svg width="26" height="22" viewBox="0 0 26 22" fill="none">
|
||||
<path d="M0 0 H11 C11 5.5, 16 5.5, 16 11 C16 16.5, 11 16.5, 11 22 H0 Z" fill="#ffedd5"/>
|
||||
<path d="M11 0 H26 V22 H11 C11 16.5, 16 16.5, 16 11 C16 5.5, 11 5.5, 11 0 Z" fill="#f3e8ff"/>
|
||||
<path d="M11 0 C11 5.5, 16 5.5, 16 11 C16 16.5, 11 16.5, 11 22" stroke="rgba(0,0,0,0.06)" stroke-width="1.5"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<!-- ================= TARJETA 4 (PASTEL LAVENDER) ================= -->
|
||||
<div class="structured-pill snap-start shrink-0 w-[285px] h-[148px] bg-[#f3e8ff] p-4 flex flex-col justify-between relative cursor-pointer border border-purple-200/50" onclick="insertRoutineToTimeline('🌙 Desconexión Nocturna', '09:30 PM', '30 min', '#f3e8ff', '📖', 'Apagar pantallas, lectura y té relajante')">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-8 h-8 rounded-full bg-white/90 shadow-2xs flex items-center justify-center text-base">
|
||||
🌙
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-purple-950 uppercase tracking-tight">descanso</span>
|
||||
</div>
|
||||
<span class="text-[10px] font-black px-2 py-0.5 rounded-full bg-purple-200 text-purple-900 lowercase">
|
||||
30 min
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="text-sm font-extrabold text-slate-900 tracking-tight leading-snug lowercase">
|
||||
rutina de descanso
|
||||
</h4>
|
||||
<p class="text-[11px] text-slate-600 line-clamp-1 font-medium mt-0.5">
|
||||
cero pantallas, preparar el día de mañana
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between pt-1">
|
||||
<span class="text-[11px] font-bold text-purple-900">09:30 pm</span>
|
||||
<button class="px-3 py-1 rounded-full bg-purple-950 hover:bg-purple-900 text-white text-[11px] font-bold transition-all shadow-xs flex items-center gap-1">
|
||||
<span>agendar</span>
|
||||
<span>+</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Puntos indicadores del carrusel -->
|
||||
<div class="flex items-center justify-center gap-1.5 mt-2">
|
||||
<button onclick="jumpToCarousel(0)" class="app-dot w-6 h-1.5 rounded-full bg-slate-900 transition-all cursor-pointer"></button>
|
||||
<button onclick="jumpToCarousel(1)" class="app-dot w-2 h-1.5 rounded-full bg-slate-300 transition-all cursor-pointer"></button>
|
||||
<button onclick="jumpToCarousel(2)" class="app-dot w-2 h-1.5 rounded-full bg-slate-300 transition-all cursor-pointer"></button>
|
||||
<button onclick="jumpToCarousel(3)" class="app-dot w-2 h-1.5 rounded-full bg-slate-300 transition-all cursor-pointer"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ========================================================== -->
|
||||
<!-- EL TIMELINE VISUAL DE RECORDATORIOS Y TAREAS (STRUCTURED 1:1) -->
|
||||
<!-- ========================================================== -->
|
||||
<div class="mb-4">
|
||||
<div class="flex items-center justify-between mb-3 px-1">
|
||||
<div>
|
||||
<span class="text-[10px] font-bold tracking-wider uppercase text-slate-400">línea de tiempo</span>
|
||||
<h3 class="text-sm font-extrabold text-slate-900 tracking-tight lowercase">
|
||||
timeline del día
|
||||
</h3>
|
||||
</div>
|
||||
<span class="text-[10px] font-semibold text-slate-500 bg-white/70 px-2.5 py-0.5 rounded-full border border-white">
|
||||
toca el círculo para tachar
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- LISTA VERTICAL DE TAREAS CON LÍNEA CENTRAL -->
|
||||
<div id="timelineTaskList" class="relative pl-7 space-y-3.5">
|
||||
|
||||
<!-- Línea vertical continua que une el día -->
|
||||
<div class="absolute left-2.5 top-3 bottom-3 w-0.5 bg-slate-300/80 rounded-full"></div>
|
||||
|
||||
<!-- Tarea 1: Despertar & Desayuno (Completada) -->
|
||||
<div class="relative timeline-task completed bg-white/90 p-3.5 border border-white flex items-center justify-between cursor-pointer" onclick="toggleTaskCompletion(this)">
|
||||
<!-- Nodo conector en la línea del tiempo -->
|
||||
<div class="absolute -left-[27px] top-1/2 -translate-y-1/2 w-4 h-4 rounded-full bg-sky-500 border-2 border-white shadow-xs"></div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-9 h-9 rounded-full bg-[#e0f2fe] flex items-center justify-center text-lg">
|
||||
☕
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-[10px] font-bold text-sky-800 uppercase tracking-tight">07:30 am • 30m</span>
|
||||
</div>
|
||||
<h5 class="task-title text-xs font-bold text-slate-900 lowercase leading-snug">
|
||||
desayuno & planificar el día
|
||||
</h5>
|
||||
<p class="text-[10px] text-slate-500 font-medium">revisar prioridades y tomar café</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Checkbox circular de Structured -->
|
||||
<div class="check-circle w-6 h-6 rounded-full bg-emerald-500 text-white flex items-center justify-center text-xs font-bold shadow-xs">
|
||||
✓
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tarea 2: Reunión de equipo (Completada) -->
|
||||
<div class="relative timeline-task completed bg-white/90 p-3.5 border border-white flex items-center justify-between cursor-pointer" onclick="toggleTaskCompletion(this)">
|
||||
<div class="absolute -left-[27px] top-1/2 -translate-y-1/2 w-4 h-4 rounded-full bg-purple-500 border-2 border-white shadow-xs"></div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-9 h-9 rounded-full bg-[#f3e8ff] flex items-center justify-center text-lg">
|
||||
💼
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-[10px] font-bold text-purple-800 uppercase tracking-tight">09:00 am • 45m</span>
|
||||
</div>
|
||||
<h5 class="task-title text-xs font-bold text-slate-900 lowercase leading-snug">
|
||||
daily sprint con el equipo
|
||||
</h5>
|
||||
<p class="text-[10px] text-slate-500 font-medium">revisión de avances del prototipo</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="check-circle w-6 h-6 rounded-full bg-emerald-500 text-white flex items-center justify-center text-xs font-bold shadow-xs">
|
||||
✓
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tarea 3: Enfoque Profundo (EN CURSO) -->
|
||||
<div class="relative timeline-task bg-[#d1fae5]/90 p-3.5 border border-emerald-200/80 flex items-center justify-between cursor-pointer shadow-xs" onclick="toggleTaskCompletion(this)">
|
||||
<div class="absolute -left-[27px] top-1/2 -translate-y-1/2 w-4 h-4 rounded-full bg-emerald-500 border-2 border-white shadow-xs animate-pulse"></div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-9 h-9 rounded-full bg-white flex items-center justify-center text-lg shadow-2xs">
|
||||
💻
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-[10px] font-extrabold text-emerald-950 uppercase tracking-tight">10:00 am • 90m</span>
|
||||
<span class="text-[9px] font-bold px-1.5 py-0.2 rounded-full bg-emerald-600 text-white">en curso</span>
|
||||
</div>
|
||||
<h5 class="task-title text-xs font-extrabold text-emerald-950 lowercase leading-snug">
|
||||
diseño de la arquitectura & api
|
||||
</h5>
|
||||
<p class="text-[10px] text-emerald-800 font-medium">bloque de concentración profunda</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="check-circle w-6 h-6 rounded-full border-2 border-emerald-600 bg-white flex items-center justify-center text-xs font-bold text-transparent hover:text-emerald-600">
|
||||
✓
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Espacio libre en el Timeline (Structured Gap) -->
|
||||
<div class="flex items-center gap-2 py-1 text-[10px] font-semibold text-slate-500 italic pl-1">
|
||||
<span>⏱️ 1h libre para descanso y caminata</span>
|
||||
</div>
|
||||
|
||||
<!-- Tarea 4: Almuerzo & Desconexión (Pendiente) -->
|
||||
<div class="relative timeline-task bg-white/90 p-3.5 border border-white flex items-center justify-between cursor-pointer" onclick="toggleTaskCompletion(this)">
|
||||
<div class="absolute -left-[27px] top-1/2 -translate-y-1/2 w-4 h-4 rounded-full bg-orange-400 border-2 border-white shadow-xs"></div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-9 h-9 rounded-full bg-[#ffedd5] flex items-center justify-center text-lg">
|
||||
🥗
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-[10px] font-bold text-orange-800 uppercase tracking-tight">01:00 pm • 60m</span>
|
||||
</div>
|
||||
<h5 class="task-title text-xs font-bold text-slate-900 lowercase leading-snug">
|
||||
almuerzo saludable & lectura
|
||||
</h5>
|
||||
<p class="text-[10px] text-slate-500 font-medium">desconectarse de pantallas</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="check-circle w-6 h-6 rounded-full border-2 border-slate-300 bg-white flex items-center justify-center text-xs font-bold text-transparent hover:text-slate-400">
|
||||
✓
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- BARRA DE NAVEGACIÓN FLOTANTE (BOTTOM DOCK) -->
|
||||
<div class="absolute bottom-3 left-4 right-4 z-40">
|
||||
<div class="bg-white/80 backdrop-blur-2xl px-6 py-2.5 rounded-full border border-white/90 shadow-[0_10px_25px_-5px_rgba(0,0,0,0.1)] flex items-center justify-between">
|
||||
|
||||
<!-- Tab Timeline (Activo) -->
|
||||
<button class="flex flex-col items-center gap-0.5 text-slate-900 cursor-pointer">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
||||
<span class="text-[9px] font-extrabold lowercase">timeline</span>
|
||||
</button>
|
||||
|
||||
<!-- Tab Calendario -->
|
||||
<button onclick="showAppToast('Vista de Calendario Mensual')" class="flex flex-col items-center gap-0.5 text-slate-400 hover:text-slate-800 cursor-pointer transition-colors">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>
|
||||
<span class="text-[9px] font-semibold lowercase">mes</span>
|
||||
</button>
|
||||
|
||||
<!-- BOTÓN CENTRAL "+" DE CREAR TAREA -->
|
||||
<button onclick="openNewTaskModal()" class="w-12 h-12 -mt-6 rounded-full bg-slate-900 hover:bg-sky-600 text-white flex items-center justify-center shadow-lg active:scale-90 transition-all cursor-pointer">
|
||||
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M12 4v16m8-8H4"/></svg>
|
||||
</button>
|
||||
|
||||
<!-- Tab Inbox (Tareas sin agendar) -->
|
||||
<button onclick="showAppToast('Buzón: 3 notas rápidas guardadas')" class="flex flex-col items-center gap-0.5 text-slate-400 hover:text-slate-800 cursor-pointer transition-colors">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"/></svg>
|
||||
<span class="text-[9px] font-semibold lowercase">inbox</span>
|
||||
</button>
|
||||
|
||||
<!-- Tab Ajustes -->
|
||||
<button onclick="showAppToast('Configuración y sincronización')" class="flex flex-col items-center gap-0.5 text-slate-400 hover:text-slate-800 cursor-pointer transition-colors">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
|
||||
<span class="text-[9px] font-semibold lowercase">ajustes</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- HOME BAR DE IPHONE -->
|
||||
<div class="absolute bottom-1 left-1/2 -translate-x-1/2 w-32 h-1 bg-slate-900/40 rounded-full z-50 pointer-events-none"></div>
|
||||
|
||||
<!-- TOAST IN-APP -->
|
||||
<div id="inAppNotice" class="absolute top-16 left-6 right-6 z-50 bg-slate-900/90 backdrop-blur-md text-white px-4 py-2.5 rounded-2xl text-xs font-semibold shadow-xl flex items-center justify-between transition-all duration-300 opacity-0 -translate-y-4 pointer-events-none">
|
||||
<span id="inAppNoticeText">¡Rutina añadida a tu agenda!</span>
|
||||
<span class="text-emerald-400">✓</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PANEL LATERAL: EXPLICACIÓN Y CARACTERÍSTICAS DE LA APP -->
|
||||
<div class="w-full max-w-md flex flex-col gap-5">
|
||||
|
||||
<!-- TARJETA INFORMATIVA -->
|
||||
<div class="bg-white/80 backdrop-blur-xl p-6 rounded-3xl border border-white/90 shadow-sm">
|
||||
<div class="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-emerald-100 text-emerald-800 text-[11px] font-bold mb-3">
|
||||
<span>✨ App Independiente de Agenda & Recordatorios</span>
|
||||
</div>
|
||||
|
||||
<h3 class="text-xl font-extrabold text-slate-900 tracking-tight lowercase mb-2">
|
||||
¿cómo funciona esta app de recordatorios?
|
||||
</h3>
|
||||
|
||||
<p class="text-xs text-slate-600 font-medium mb-4 leading-relaxed">
|
||||
Esta aplicación adopta el concepto exacto de <strong>Structured</strong>: transformar listas de tareas aburridas en una <strong>línea de tiempo visual</strong> con colores pasteles, donde cada momento de tu día tiene un espacio claro y conectado.
|
||||
</p>
|
||||
|
||||
<div class="space-y-3 text-xs">
|
||||
<div class="flex items-start gap-3 p-3 rounded-2xl bg-sky-50/70 border border-sky-100">
|
||||
<span class="text-lg">🧩</span>
|
||||
<div>
|
||||
<strong class="text-slate-900 font-bold block lowercase">1. carrusel de rutinas con conectores puzzle</strong>
|
||||
<p class="text-slate-600 mt-0.5">Las cápsulas del carrusel son plantillas de hábitos frecuentes (rutina mañanera, deep work, gym). Al tocar cualquiera, se inserta directo en tu timeline.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-start gap-3 p-3 rounded-2xl bg-emerald-50/70 border border-emerald-100">
|
||||
<span class="text-lg">🕒</span>
|
||||
<div>
|
||||
<strong class="text-slate-900 font-bold block lowercase">2. timeline visual interactivo</strong>
|
||||
<p class="text-slate-600 mt-0.5">Cada tarea tiene su horario y duración. Puedes tocar el círculo verde para marcarla como completada y ver cómo avanza tu porcentaje del día.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-start gap-3 p-3 rounded-2xl bg-orange-50/70 border border-orange-100">
|
||||
<span class="text-lg">🎨</span>
|
||||
<div>
|
||||
<strong class="text-slate-900 font-bold block lowercase">3. paleta pastel relajante</strong>
|
||||
<p class="text-slate-600 mt-0.5">Usa los colores suaves de SiboPay (Cielo, Menta, Melocotón, Lavanda, Vainilla) que reducen el estrés visual característico de Structured.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PRUEBAS RÁPIDAS -->
|
||||
<div class="bg-white/80 backdrop-blur-xl p-5 rounded-3xl border border-white/90 shadow-sm flex flex-col gap-3">
|
||||
<h4 class="text-xs font-bold text-slate-400 uppercase tracking-wider">
|
||||
acciones interactivas de prueba
|
||||
</h4>
|
||||
|
||||
<div class="grid grid-cols-2 gap-2 text-xs font-bold">
|
||||
<button onclick="insertRoutineToTimeline('☕ Pausa de Café', '03:30 PM', '20 min', '#ffedd5', '☕', 'Desconexión rápida')" class="p-2.5 rounded-2xl bg-orange-500 hover:bg-orange-600 text-white transition-all shadow-xs cursor-pointer text-center">
|
||||
+ Insertar Pausa
|
||||
</button>
|
||||
<button onclick="insertRoutineToTimeline('📖 Lectura Nocturna', '09:00 PM', '45 min', '#f3e8ff', '📖', 'Leer 15 páginas')" class="p-2.5 rounded-2xl bg-purple-600 hover:bg-purple-700 text-white transition-all shadow-xs cursor-pointer text-center">
|
||||
+ Insertar Lectura
|
||||
</button>
|
||||
<button onclick="scrollAppCarousel(1)" class="p-2.5 rounded-2xl bg-slate-900 hover:bg-slate-800 text-white transition-all shadow-xs cursor-pointer text-center">
|
||||
› Siguiente Rutina
|
||||
</button>
|
||||
<button onclick="openNewTaskModal()" class="p-2.5 rounded-2xl bg-sky-600 hover:bg-sky-700 text-white transition-all shadow-xs cursor-pointer text-center">
|
||||
✏️ Crear Personalizada
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<!-- MODAL PARA CREAR NUEVA TAREA / RECORDATORIO -->
|
||||
<div id="newTaskModal" class="fixed inset-0 z-50 bg-black/40 backdrop-blur-xs flex items-center justify-center p-4 opacity-0 pointer-events-none transition-opacity duration-300">
|
||||
<div class="bg-white rounded-[36px] p-6 max-w-sm w-full shadow-2xl border border-slate-100 flex flex-col gap-4">
|
||||
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="text-lg font-black text-slate-900 tracking-tight lowercase">nueva tarea o recordatorio</h3>
|
||||
<button onclick="closeNewTaskModal()" class="w-8 h-8 rounded-full bg-slate-100 hover:bg-slate-200 text-slate-700 font-bold text-sm flex items-center justify-center cursor-pointer">
|
||||
✕
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Nombre de la tarea -->
|
||||
<div>
|
||||
<label class="text-[11px] font-bold text-slate-500 uppercase tracking-wider block mb-1">título de la tarea</label>
|
||||
<input id="inputTaskTitle" type="text" placeholder="Ej: Llamar al médico, Estudiar..." class="w-full px-4 py-2.5 rounded-2xl bg-slate-50 border border-slate-200 text-xs font-semibold text-slate-800 focus:outline-none focus:border-sky-500">
|
||||
</div>
|
||||
|
||||
<!-- Hora y duración -->
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<div>
|
||||
<label class="text-[11px] font-bold text-slate-500 uppercase tracking-wider block mb-1">hora</label>
|
||||
<input id="inputTaskTime" type="time" value="14:00" class="w-full px-3 py-2 rounded-2xl bg-slate-50 border border-slate-200 text-xs font-semibold text-slate-800 focus:outline-none">
|
||||
</div>
|
||||
<div>
|
||||
<label class="text-[11px] font-bold text-slate-500 uppercase tracking-wider block mb-1">duración</label>
|
||||
<select id="inputTaskDuration" class="w-full px-3 py-2 rounded-2xl bg-slate-50 border border-slate-200 text-xs font-semibold text-slate-800 focus:outline-none">
|
||||
<option value="15 min">15 min</option>
|
||||
<option value="30 min">30 min</option>
|
||||
<option value="45 min" selected>45 min</option>
|
||||
<option value="60 min">1 hora</option>
|
||||
<option value="90 min">1h 30m</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Selector de color pastel -->
|
||||
<div>
|
||||
<label class="text-[11px] font-bold text-slate-500 uppercase tracking-wider block mb-1.5">color pastel</label>
|
||||
<div class="flex items-center gap-2">
|
||||
<label class="cursor-pointer"><input type="radio" name="colorChoice" value="#e0f2fe" checked class="peer sr-only"><span class="w-7 h-7 rounded-full bg-[#e0f2fe] border-2 border-transparent peer-checked:border-sky-600 block"></span></label>
|
||||
<label class="cursor-pointer"><input type="radio" name="colorChoice" value="#d1fae5" class="peer sr-only"><span class="w-7 h-7 rounded-full bg-[#d1fae5] border-2 border-transparent peer-checked:border-emerald-600 block"></span></label>
|
||||
<label class="cursor-pointer"><input type="radio" name="colorChoice" value="#ffedd5" class="peer sr-only"><span class="w-7 h-7 rounded-full bg-[#ffedd5] border-2 border-transparent peer-checked:border-orange-600 block"></span></label>
|
||||
<label class="cursor-pointer"><input type="radio" name="colorChoice" value="#f3e8ff" class="peer sr-only"><span class="w-7 h-7 rounded-full bg-[#f3e8ff] border-2 border-transparent peer-checked:border-purple-600 block"></span></label>
|
||||
<label class="cursor-pointer"><input type="radio" name="colorChoice" value="#fef9c3" class="peer sr-only"><span class="w-7 h-7 rounded-full bg-[#fef9c3] border-2 border-transparent peer-checked:border-amber-600 block"></span></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Selector de Emoji -->
|
||||
<div>
|
||||
<label class="text-[11px] font-bold text-slate-500 uppercase tracking-wider block mb-1.5">icono</label>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<button type="button" onclick="selectEmoji(this, '📝')" class="emoji-btn w-8 h-8 rounded-full bg-slate-100 border border-slate-200 text-sm flex items-center justify-center">📝</button>
|
||||
<button type="button" onclick="selectEmoji(this, '⚡')" class="emoji-btn w-8 h-8 rounded-full bg-slate-100 border border-slate-200 text-sm flex items-center justify-center">⚡</button>
|
||||
<button type="button" onclick="selectEmoji(this, '📞')" class="emoji-btn w-8 h-8 rounded-full bg-slate-100 border border-slate-200 text-sm flex items-center justify-center">📞</button>
|
||||
<button type="button" onclick="selectEmoji(this, '🏋️')" class="emoji-btn w-8 h-8 rounded-full bg-slate-100 border border-slate-200 text-sm flex items-center justify-center">🏋️</button>
|
||||
<button type="button" onclick="selectEmoji(this, '💊')" class="emoji-btn w-8 h-8 rounded-full bg-slate-100 border border-slate-200 text-sm flex items-center justify-center">💊</button>
|
||||
<button type="button" onclick="selectEmoji(this, '🛒')" class="emoji-btn w-8 h-8 rounded-full bg-slate-100 border border-slate-200 text-sm flex items-center justify-center">🛒</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Botón Guardar -->
|
||||
<div class="pt-2">
|
||||
<button onclick="saveNewTask()" class="w-full py-3 rounded-full bg-slate-900 hover:bg-sky-600 text-white text-xs font-black uppercase tracking-wider shadow-sm transition-all cursor-pointer">
|
||||
guardar en el timeline
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- JAVASCRIPT DE LA APLICACIÓN -->
|
||||
<script>
|
||||
const carousel = document.getElementById('agendaCarouselTrack');
|
||||
const dots = document.querySelectorAll('.app-dot');
|
||||
let selectedEmojiVal = '📝';
|
||||
|
||||
// Navegación en el carrusel
|
||||
function scrollAppCarousel(direction) {
|
||||
const step = 311; // Ancho tarjeta + conector
|
||||
carousel.scrollBy({ left: direction * step, behavior: 'smooth' });
|
||||
setTimeout(updateAppDots, 300);
|
||||
}
|
||||
|
||||
function jumpToCarousel(index) {
|
||||
const step = 311;
|
||||
carousel.scrollTo({ left: index * step, behavior: 'smooth' });
|
||||
setDotActive(index);
|
||||
}
|
||||
|
||||
function updateAppDots() {
|
||||
const step = 311;
|
||||
const index = Math.min(3, Math.max(0, Math.round(carousel.scrollLeft / step)));
|
||||
setDotActive(index);
|
||||
}
|
||||
|
||||
function setDotActive(index) {
|
||||
dots.forEach((dot, idx) => {
|
||||
if (idx === index) {
|
||||
dot.className = 'app-dot w-6 h-1.5 rounded-full bg-slate-900 transition-all cursor-pointer';
|
||||
} else {
|
||||
dot.className = 'app-dot w-2 h-1.5 rounded-full bg-slate-300 transition-all cursor-pointer';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
carousel.addEventListener('scroll', () => {
|
||||
clearTimeout(window.appScrollT);
|
||||
window.appScrollT = setTimeout(updateAppDots, 80);
|
||||
});
|
||||
|
||||
// Marcar/Desmarcar tarea completada estilo Structured
|
||||
function toggleTaskCompletion(taskElement) {
|
||||
taskElement.classList.toggle('completed');
|
||||
const check = taskElement.querySelector('.check-circle');
|
||||
|
||||
if (taskElement.classList.contains('completed')) {
|
||||
check.className = 'check-circle w-6 h-6 rounded-full bg-emerald-500 text-white flex items-center justify-center text-xs font-bold shadow-xs animate-pop';
|
||||
check.textContent = '✓';
|
||||
showAppToast('¡Tarea completada!');
|
||||
} else {
|
||||
check.className = 'check-circle w-6 h-6 rounded-full border-2 border-slate-300 bg-white flex items-center justify-center text-xs font-bold text-transparent hover:text-slate-400';
|
||||
check.textContent = '✓';
|
||||
}
|
||||
|
||||
updateProgressStats();
|
||||
}
|
||||
|
||||
// Actualizar porcentaje de productividad
|
||||
function updateProgressStats() {
|
||||
const allTasks = document.querySelectorAll('#timelineTaskList .timeline-task');
|
||||
const completedTasks = document.querySelectorAll('#timelineTaskList .timeline-task.completed');
|
||||
const total = allTasks.length;
|
||||
const done = completedTasks.length;
|
||||
const pct = total === 0 ? 0 : Math.round((done / total) * 100);
|
||||
|
||||
document.getElementById('progressPercent').textContent = pct + '%';
|
||||
document.getElementById('progressCount').textContent = `${done} de ${total}`;
|
||||
}
|
||||
|
||||
// Insertar rutina desde el carrusel directamente al timeline
|
||||
function insertRoutineToTimeline(title, time, duration, color, emoji, note) {
|
||||
const list = document.getElementById('timelineTaskList');
|
||||
|
||||
const task = document.createElement('div');
|
||||
task.className = 'relative timeline-task bg-white/95 p-3.5 border border-white flex items-center justify-between cursor-pointer shadow-xs';
|
||||
task.onclick = function() { toggleTaskCompletion(task); };
|
||||
|
||||
task.innerHTML = `
|
||||
<div class="absolute -left-[27px] top-1/2 -translate-y-1/2 w-4 h-4 rounded-full border-2 border-white shadow-xs" style="background-color: ${color}"></div>
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-9 h-9 rounded-full flex items-center justify-center text-lg" style="background-color: ${color}">
|
||||
${emoji}
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-[10px] font-bold text-slate-800 uppercase tracking-tight">${time} • ${duration}</span>
|
||||
</div>
|
||||
<h5 class="task-title text-xs font-bold text-slate-900 lowercase leading-snug">
|
||||
${title}
|
||||
</h5>
|
||||
<p class="text-[10px] text-slate-500 font-medium">${note}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="check-circle w-6 h-6 rounded-full border-2 border-slate-300 bg-white flex items-center justify-center text-xs font-bold text-transparent hover:text-slate-400">
|
||||
✓
|
||||
</div>
|
||||
`;
|
||||
|
||||
list.appendChild(task);
|
||||
updateProgressStats();
|
||||
showAppToast(`"${title}" agregada al timeline`);
|
||||
|
||||
// Auto-scroll hacia la nueva tarea
|
||||
task.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
||||
}
|
||||
|
||||
// Modal de nueva tarea
|
||||
function openNewTaskModal() {
|
||||
const modal = document.getElementById('newTaskModal');
|
||||
modal.classList.remove('opacity-0', 'pointer-events-none');
|
||||
modal.classList.add('opacity-100');
|
||||
}
|
||||
|
||||
function closeNewTaskModal() {
|
||||
const modal = document.getElementById('newTaskModal');
|
||||
modal.classList.remove('opacity-100');
|
||||
modal.classList.add('opacity-0', 'pointer-events-none');
|
||||
}
|
||||
|
||||
function selectEmoji(btn, emoji) {
|
||||
document.querySelectorAll('.emoji-btn').forEach(b => b.classList.remove('bg-sky-200', 'border-sky-500'));
|
||||
btn.classList.add('bg-sky-200', 'border-sky-500');
|
||||
selectedEmojiVal = emoji;
|
||||
}
|
||||
|
||||
function saveNewTask() {
|
||||
const titleInput = document.getElementById('inputTaskTitle');
|
||||
const title = titleInput.value.trim() || 'Recordatorio rápido';
|
||||
const timeVal = document.getElementById('inputTaskTime').value || '15:00';
|
||||
const duration = document.getElementById('inputTaskDuration').value;
|
||||
const color = document.querySelector('input[name="colorChoice"]:checked').value;
|
||||
|
||||
insertRoutineToTimeline(title, timeVal, duration, color, selectedEmojiVal, 'Recordatorio personalizado');
|
||||
titleInput.value = '';
|
||||
closeNewTaskModal();
|
||||
}
|
||||
|
||||
// Selector de fecha
|
||||
function selectDate(btn, label) {
|
||||
btn.parentElement.querySelectorAll('button').forEach(b => {
|
||||
b.className = 'px-3.5 py-1.5 rounded-full bg-white/70 hover:bg-white text-slate-700 shrink-0 border border-white/80 lowercase transition-all cursor-pointer';
|
||||
});
|
||||
btn.className = 'px-4 py-1.5 rounded-full bg-slate-900 text-white shadow-xs shrink-0 lowercase cursor-pointer';
|
||||
showAppToast(`Viendo agenda de: ${label}`);
|
||||
}
|
||||
|
||||
// Cambiar paleta de tema
|
||||
function changeTheme(viewportBg, bodyBg, name) {
|
||||
document.getElementById('appViewport').style.backgroundColor = viewportBg;
|
||||
document.getElementById('pageBody').style.backgroundColor = bodyBg;
|
||||
showAppToast(`Tema cambiado a: ${name}`);
|
||||
}
|
||||
|
||||
// Toast flotante dentro de la app
|
||||
function showAppToast(msg) {
|
||||
const notice = document.getElementById('inAppNotice');
|
||||
const text = document.getElementById('inAppNoticeText');
|
||||
text.textContent = msg;
|
||||
notice.classList.remove('opacity-0', '-translate-y-4', 'pointer-events-none');
|
||||
notice.classList.add('opacity-100', 'translate-y-0');
|
||||
|
||||
clearTimeout(window.noticeTimer);
|
||||
window.noticeTimer = setTimeout(() => {
|
||||
notice.classList.remove('opacity-100', 'translate-y-0');
|
||||
notice.classList.add('opacity-0', '-translate-y-4', 'pointer-events-none');
|
||||
}, 2400);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,938 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SiboPay — Carrusel Estilo Structured en la App</title>
|
||||
<script src="https://www.gstatic.com/antigravity/web/dev/tailwindcss.min.js"></script>
|
||||
<style>
|
||||
/* Tipografía y suavizado idéntico a Structured */
|
||||
* {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* Scrollbar oculta para el snap carousel */
|
||||
.no-scrollbar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
.no-scrollbar {
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
/* Transición suave de temas */
|
||||
.theme-transition {
|
||||
transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s ease;
|
||||
}
|
||||
|
||||
/* Cápsula móvil estilo Structured */
|
||||
.app-card-pill {
|
||||
border-radius: 36px;
|
||||
box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.08), inset 0 1.5px 1px rgba(255, 255, 255, 0.85);
|
||||
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
|
||||
}
|
||||
.app-card-pill:hover, .app-card-pill:active {
|
||||
transform: translateY(-2px) scale(1.01);
|
||||
box-shadow: 0 16px 32px -6px rgba(0, 0, 0, 0.12), inset 0 1.5px 1px rgba(255, 255, 255, 0.95);
|
||||
}
|
||||
|
||||
/* Efecto puzzle connector entre tarjetas */
|
||||
.puzzle-connector {
|
||||
width: 28px;
|
||||
height: 22px;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Discos circulares interactivos estilo Structured */
|
||||
.explore-disk {
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
border-radius: 9999px;
|
||||
box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.07), inset 0 1.5px 1px rgba(255, 255, 255, 0.85);
|
||||
transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
}
|
||||
.explore-disk:active {
|
||||
transform: scale(0.92);
|
||||
}
|
||||
|
||||
/* Timeline vertical de Structured */
|
||||
.timeline-pill {
|
||||
border-radius: 26px;
|
||||
box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.8);
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
.timeline-pill:hover {
|
||||
transform: translateX(3px);
|
||||
}
|
||||
|
||||
/* Animación de pulso suave */
|
||||
@keyframes gentle-pulse {
|
||||
0%, 100% { opacity: 1; transform: scale(1); }
|
||||
50% { opacity: 0.85; transform: scale(1.05); }
|
||||
}
|
||||
.animate-gentle {
|
||||
animation: gentle-pulse 3s infinite ease-in-out;
|
||||
}
|
||||
|
||||
/* Efecto de marco de iPhone */
|
||||
.iphone-shell {
|
||||
box-shadow:
|
||||
0 0 0 12px #1e293b,
|
||||
0 0 0 14px #334155,
|
||||
0 25px 60px -15px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
/* Animación de deslizamiento automático continuo si se activa */
|
||||
@keyframes marquee-mobile {
|
||||
0% { transform: translateX(0); }
|
||||
100% { transform: translateX(-50%); }
|
||||
}
|
||||
.track-auto {
|
||||
animation: marquee-mobile 24s linear infinite;
|
||||
}
|
||||
.track-auto:hover {
|
||||
animation-play-state: paused;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body id="mainBody" class="theme-transition min-h-screen font-sans bg-[#e6f4fe] text-slate-800 p-4 md:p-8 flex flex-col items-center justify-start">
|
||||
|
||||
<!-- HEADER DEL ESTUDIO / PRESENTACIÓN -->
|
||||
<header class="w-full max-w-5xl mx-auto mb-6 flex flex-col md:flex-row items-center justify-between gap-4 bg-white/70 backdrop-blur-xl p-4 md:px-6 rounded-3xl border border-white/80 shadow-[0_8px_30px_rgba(0,0,0,0.04)]">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded-2xl bg-gradient-to-tr from-sky-600 to-cyan-400 flex items-center justify-center text-white font-extrabold text-xl shadow-md">
|
||||
S
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-xl font-bold tracking-tight text-slate-900">sibopay</span>
|
||||
<span class="text-[11px] font-bold uppercase tracking-wider px-2.5 py-0.5 rounded-full bg-sky-100 text-sky-800 border border-sky-200">
|
||||
Diseño In-App • Structured
|
||||
</span>
|
||||
</div>
|
||||
<p class="text-xs text-slate-500 font-medium">Así luce el carrusel de cápsulas y conectores dentro de la pantalla del celular</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTROLES DEL PROTOTIPO -->
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<!-- Selector de color pastel de la App -->
|
||||
<div class="flex items-center gap-1.5 bg-white/90 p-1.5 rounded-2xl border border-slate-200/80 shadow-xs">
|
||||
<span class="text-[11px] font-semibold text-slate-500 pl-1.5">Fondo App:</span>
|
||||
<button onclick="setTheme('#e0f2fe', '#f0f9ff')" title="Cielo SiboPay" class="w-6 h-6 rounded-full bg-[#e0f2fe] border-2 border-sky-400 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
<button onclick="setTheme('#d1fae5', '#ecfdf5')" title="Menta Fresca" class="w-6 h-6 rounded-full bg-[#d1fae5] border-2 border-emerald-400 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
<button onclick="setTheme('#ffedd5', '#fff7ed')" title="Melocotón Pastel" class="w-6 h-6 rounded-full bg-[#ffedd5] border-2 border-orange-400 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
<button onclick="setTheme('#f3e8ff', '#faf5ff')" title="Lavanda Suave" class="w-6 h-6 rounded-full bg-[#f3e8ff] border-2 border-purple-400 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
<button onclick="setTheme('#fef9c3', '#fefce8')" title="Vainilla Cálido" class="w-6 h-6 rounded-full bg-[#fef9c3] border-2 border-amber-400 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
<button onclick="setTheme('#f8fafc', '#ffffff')" title="Blanco Minimalista" class="w-6 h-6 rounded-full bg-[#ffffff] border-2 border-slate-300 hover:scale-110 transition-transform cursor-pointer"></button>
|
||||
</div>
|
||||
|
||||
<!-- Selector de Vista -->
|
||||
<div class="flex items-center bg-slate-100 p-1 rounded-2xl border border-slate-200 text-xs font-semibold">
|
||||
<button id="btnViewPhone" onclick="setViewMode('phone')" class="px-3 py-1.5 rounded-xl bg-white text-slate-800 shadow-xs transition-all cursor-pointer">
|
||||
📱 Vista Móvil
|
||||
</button>
|
||||
<button id="btnViewComponent" onclick="setViewMode('component')" class="px-3 py-1.5 rounded-xl text-slate-500 hover:text-slate-800 transition-all cursor-pointer">
|
||||
🔍 Zoom Componente
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Botón Autoplay -->
|
||||
<button id="btnAutoplay" onclick="toggleAutoFlow()" class="px-3.5 py-1.5 rounded-2xl bg-white hover:bg-slate-50 text-slate-700 text-xs font-semibold border border-slate-200 shadow-xs flex items-center gap-1.5 transition-all cursor-pointer">
|
||||
<span id="autoplayIcon">▶</span>
|
||||
<span id="autoplayText">Flujo Continuo</span>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- CONTENEDOR PRINCIPAL: VISTA DEL CELULAR (IPHONE 16 PRO FRAME) -->
|
||||
<main class="w-full max-w-5xl flex flex-col lg:flex-row items-center justify-center gap-10">
|
||||
|
||||
<!-- EL TELÉFONO MÓVIL CON LA APP ADENTRO -->
|
||||
<div id="phoneFrame" class="iphone-shell relative w-[390px] h-[812px] bg-slate-900 rounded-[52px] p-3 flex flex-col shrink-0 select-none overflow-hidden transition-all duration-500">
|
||||
|
||||
<!-- Borde interno de pantalla -->
|
||||
<div id="appScreen" class="theme-transition relative w-full h-full bg-[#e0f2fe] rounded-[42px] overflow-hidden flex flex-col justify-between">
|
||||
|
||||
<!-- STATUS BAR & DYNAMIC ISLAND -->
|
||||
<div class="relative pt-3 pb-1 px-7 flex items-center justify-between z-40 text-slate-800 font-semibold text-xs tracking-tight">
|
||||
<span>9:41</span>
|
||||
|
||||
<!-- DYNAMIC ISLAND DE APPLE -->
|
||||
<div class="w-28 h-7 bg-black rounded-full flex items-center justify-between px-2.5 shadow-inner">
|
||||
<div class="w-2.5 h-2.5 rounded-full bg-emerald-500 animate-pulse"></div>
|
||||
<span class="text-[10px] text-white/90 font-medium tracking-wide">sibopay</span>
|
||||
<div class="w-2.5 h-2.5 rounded-full bg-sky-400"></div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-1.5 text-slate-800">
|
||||
<svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="currentColor"><path d="M12 3c-4.97 0-9 4.03-9 9 0 2.12.74 4.07 1.97 5.61L12 22l7.03-4.39C20.26 16.07 21 14.12 21 12c0-4.97-4.03-9-9-9z"/></svg>
|
||||
<svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="currentColor"><path d="M2 17h20v2H2zm1.15-4.05L4 11.47l.85 1.48L6 12.33V17H4v-4.05zM9 17h2v-7H9v7zm5 0h2V7h-2v10zm5 0h2V4h-2v13z"/></svg>
|
||||
<div class="w-5 h-2.5 border border-slate-700 rounded-sm p-0.5 flex items-center">
|
||||
<div class="w-full h-full bg-slate-800 rounded-2xs"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- APP BODY SCROLLABLE -->
|
||||
<div id="appScrollArea" class="flex-1 overflow-y-auto no-scrollbar pb-24 px-4 pt-2">
|
||||
|
||||
<!-- APP TOP HEADER CON PERFIL Y SALDO -->
|
||||
<div class="flex items-center justify-between mb-4 pt-1">
|
||||
<div class="flex items-center gap-2.5">
|
||||
<div class="relative">
|
||||
<img src="https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=100&auto=format&fit=crop&q=80" alt="Avatar" class="w-10 h-10 rounded-full object-cover border-2 border-white shadow-xs">
|
||||
<div class="absolute -bottom-0.5 -right-0.5 w-3.5 h-3.5 rounded-full bg-emerald-500 border-2 border-white"></div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center gap-1 text-[11px] font-semibold text-slate-500 lowercase">
|
||||
<span>colegio saint paul</span>
|
||||
<span>•</span>
|
||||
<span>2° A</span>
|
||||
</div>
|
||||
<h2 class="text-sm font-extrabold text-slate-900 tracking-tight leading-tight lowercase">
|
||||
hola, mateo 👋
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CHIP DE SALDO CON GLOW SUAVE -->
|
||||
<div onclick="showToast('Saldo disponible: ₡14.500')" class="flex flex-col items-end bg-white/80 backdrop-blur-md px-3 py-1.5 rounded-2xl border border-white/90 shadow-xs cursor-pointer active:scale-95 transition-transform">
|
||||
<span class="text-[10px] uppercase font-bold text-slate-400 tracking-wider">saldo disponible</span>
|
||||
<span class="text-sm font-extrabold text-slate-900">₡14.500</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SELECTOR HORIZONTAL DE DÍAS Y RUTINAS (ESTILO STRUCTURED) -->
|
||||
<div class="flex items-center gap-2 overflow-x-auto no-scrollbar py-1 mb-4 text-xs font-semibold">
|
||||
<button class="px-3.5 py-1.5 rounded-full bg-slate-900 text-white shadow-sm shrink-0 lowercase">
|
||||
hoy, 10 oct
|
||||
</button>
|
||||
<button class="px-3.5 py-1.5 rounded-full bg-white/70 hover:bg-white text-slate-700 shrink-0 border border-white/80 lowercase transition-colors">
|
||||
recreo 1
|
||||
</button>
|
||||
<button class="px-3.5 py-1.5 rounded-full bg-white/70 hover:bg-white text-slate-700 shrink-0 border border-white/80 lowercase transition-colors">
|
||||
almuerzo
|
||||
</button>
|
||||
<button class="px-3.5 py-1.5 rounded-full bg-white/70 hover:bg-white text-slate-700 shrink-0 border border-white/80 lowercase transition-colors">
|
||||
recreo 2
|
||||
</button>
|
||||
<button class="px-3.5 py-1.5 rounded-full bg-white/70 hover:bg-white text-slate-700 shrink-0 border border-white/80 lowercase transition-colors">
|
||||
servicios
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- ======================================================== -->
|
||||
<!-- SECCIÓN PROTAGONISTA: EL CARRUSEL ESTILO STRUCTURED EN LA APP -->
|
||||
<!-- ======================================================== -->
|
||||
<div class="mb-6">
|
||||
<div class="flex items-center justify-between mb-2.5 px-1">
|
||||
<div>
|
||||
<span class="text-[10px] font-bold tracking-wider uppercase text-sky-800/80">combos & promociones</span>
|
||||
<h3 class="text-base font-extrabold text-slate-900 tracking-tight lowercase">
|
||||
destacados del día
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<!-- Mini Flechas de Navegación -->
|
||||
<div class="flex items-center gap-1.5">
|
||||
<button onclick="scrollCarousel(-1)" class="w-7 h-7 rounded-full bg-white/80 hover:bg-white border border-white flex items-center justify-center text-slate-700 shadow-2xs active:scale-90 transition-all cursor-pointer">
|
||||
‹
|
||||
</button>
|
||||
<button onclick="scrollCarousel(1)" class="w-7 h-7 rounded-full bg-white/80 hover:bg-white border border-white flex items-center justify-center text-slate-700 shadow-2xs active:scale-90 transition-all cursor-pointer">
|
||||
›
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTENEDOR DEL CARRUSEL DE CÁPSULAS CONECTADAS -->
|
||||
<div class="relative overflow-hidden py-2 -mx-4 px-4 mask-fade">
|
||||
|
||||
<div id="appCarouselTrack" class="flex items-center overflow-x-auto no-scrollbar scroll-smooth snap-x snap-mandatory py-1" style="scroll-padding-left: 16px;">
|
||||
|
||||
<!-- ================= CARD 1 (PASTEL SKY) ================= -->
|
||||
<div class="app-card-pill snap-start shrink-0 w-[295px] h-[155px] bg-[#e0f2fe] p-4 flex flex-col justify-between relative cursor-pointer border border-sky-200/50" onclick="selectCard('Combo Recreo Saludable', '1.850')">
|
||||
<!-- Fila superior -->
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-8 h-8 rounded-full bg-white/90 shadow-2xs flex items-center justify-center text-lg">
|
||||
🥪
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-sky-900/80 uppercase tracking-wide">
|
||||
recreo 1 • 09:30 am
|
||||
</span>
|
||||
</div>
|
||||
<span class="text-[10px] font-extrabold px-2 py-0.5 rounded-full bg-sky-200/70 text-sky-900 lowercase">
|
||||
popular
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Título y descripción -->
|
||||
<div>
|
||||
<h4 class="text-sm font-extrabold text-slate-900 tracking-tight leading-snug lowercase">
|
||||
sandwich artesanal & jugo
|
||||
</h4>
|
||||
<p class="text-[11px] text-slate-600 line-clamp-1 font-medium mt-0.5">
|
||||
jamón de pavo, queso suizo y jugo de naranja
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Fila inferior: Precio y Botón Rápido -->
|
||||
<div class="flex items-center justify-between pt-1">
|
||||
<div class="flex items-baseline gap-1">
|
||||
<span class="text-xs font-bold text-slate-400">₡</span>
|
||||
<span class="text-base font-black text-slate-900 tracking-tight">1.850</span>
|
||||
</div>
|
||||
<button onclick="event.stopPropagation(); orderItem('Sandwich & Jugo', '1.850')" class="px-3 py-1 rounded-full bg-slate-900 hover:bg-sky-600 active:scale-95 text-white text-[11px] font-bold transition-all shadow-xs flex items-center gap-1 cursor-pointer">
|
||||
<span>pre-ordenar</span>
|
||||
<span>+</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR PUZZLE 1 (Sky a Mint) -->
|
||||
<div class="puzzle-connector">
|
||||
<svg width="28" height="22" viewBox="0 0 28 22" fill="none">
|
||||
<!-- Base izquierda (Sky) -->
|
||||
<path d="M0 0 H12 C12 6, 17 6, 17 11 C17 16, 12 16, 12 22 H0 Z" fill="#e0f2fe"/>
|
||||
<!-- Cabeza encajada derecha (Mint) -->
|
||||
<path d="M12 0 H28 V22 H12 C12 16, 17 16, 17 11 C17 6, 12 6, 12 0 Z" fill="#d1fae5"/>
|
||||
<!-- Línea de junta tipo rompecabezas -->
|
||||
<path d="M12 0 C12 6, 17 6, 17 11 C17 16, 12 16, 12 22" stroke="rgba(0,0,0,0.06)" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<!-- ================= CARD 2 (PASTEL MINT) ================= -->
|
||||
<div class="app-card-pill snap-start shrink-0 w-[295px] h-[155px] bg-[#d1fae5] p-4 flex flex-col justify-between relative cursor-pointer border border-emerald-200/50" onclick="selectCard('Recarga Inmediata SINPE', 'Personalizado')">
|
||||
<!-- Fila superior -->
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-8 h-8 rounded-full bg-white/90 shadow-2xs flex items-center justify-center text-lg">
|
||||
⚡
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-emerald-950/80 uppercase tracking-wide">
|
||||
sinpe móvil directo
|
||||
</span>
|
||||
</div>
|
||||
<span class="text-[10px] font-extrabold px-2 py-0.5 rounded-full bg-emerald-200/80 text-emerald-900 lowercase">
|
||||
inmediato
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Título y descripción -->
|
||||
<div>
|
||||
<h4 class="text-sm font-extrabold text-slate-900 tracking-tight leading-snug lowercase">
|
||||
recarga de saldo en 1 toque
|
||||
</h4>
|
||||
<p class="text-[11px] text-slate-600 line-clamp-1 font-medium mt-0.5">
|
||||
acreditación sin comisión al número 8888-7777
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Fila inferior: Precio y Botón Rápido -->
|
||||
<div class="flex items-center justify-between pt-1">
|
||||
<div class="text-[11px] font-extrabold text-emerald-900">
|
||||
0% comisiones
|
||||
</div>
|
||||
<button onclick="event.stopPropagation(); openSinpeModal()" class="px-3 py-1 rounded-full bg-emerald-900 hover:bg-emerald-800 active:scale-95 text-white text-[11px] font-bold transition-all shadow-xs flex items-center gap-1 cursor-pointer">
|
||||
<span>recargar</span>
|
||||
<span>⚡</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR PUZZLE 2 (Mint a Peach) -->
|
||||
<div class="puzzle-connector">
|
||||
<svg width="28" height="22" viewBox="0 0 28 22" fill="none">
|
||||
<path d="M0 0 H12 C12 6, 17 6, 17 11 C17 16, 12 16, 12 22 H0 Z" fill="#d1fae5"/>
|
||||
<path d="M12 0 H28 V22 H12 C12 16, 17 16, 17 11 C17 6, 12 6, 12 0 Z" fill="#ffedd5"/>
|
||||
<path d="M12 0 C12 6, 17 6, 17 11 C17 16, 12 16, 12 22" stroke="rgba(0,0,0,0.06)" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<!-- ================= CARD 3 (PASTEL PEACH) ================= -->
|
||||
<div class="app-card-pill snap-start shrink-0 w-[295px] h-[155px] bg-[#ffedd5] p-4 flex flex-col justify-between relative cursor-pointer border border-orange-200/50" onclick="selectCard('Casado Gourmet del Chef', '2.600')">
|
||||
<!-- Fila superior -->
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-8 h-8 rounded-full bg-white/90 shadow-2xs flex items-center justify-center text-lg">
|
||||
🍛
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-orange-950/80 uppercase tracking-wide">
|
||||
almuerzo • 11:45 am
|
||||
</span>
|
||||
</div>
|
||||
<span class="text-[10px] font-extrabold px-2 py-0.5 rounded-full bg-orange-200/80 text-orange-900 lowercase">
|
||||
menú chef
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Título y descripción -->
|
||||
<div>
|
||||
<h4 class="text-sm font-extrabold text-slate-900 tracking-tight leading-snug lowercase">
|
||||
casado completo con pollo
|
||||
</h4>
|
||||
<p class="text-[11px] text-slate-600 line-clamp-1 font-medium mt-0.5">
|
||||
arroz, frijoles, plátano maduro, ensalada y té frío
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Fila inferior: Precio y Botón Rápido -->
|
||||
<div class="flex items-center justify-between pt-1">
|
||||
<div class="flex items-baseline gap-1">
|
||||
<span class="text-xs font-bold text-slate-400">₡</span>
|
||||
<span class="text-base font-black text-slate-900 tracking-tight">2.600</span>
|
||||
</div>
|
||||
<button onclick="event.stopPropagation(); orderItem('Casado Gourmet', '2.600')" class="px-3 py-1 rounded-full bg-orange-950 hover:bg-orange-900 active:scale-95 text-white text-[11px] font-bold transition-all shadow-xs flex items-center gap-1 cursor-pointer">
|
||||
<span>reservar</span>
|
||||
<span>+</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR PUZZLE 3 (Peach a Lavender) -->
|
||||
<div class="puzzle-connector">
|
||||
<svg width="28" height="22" viewBox="0 0 28 22" fill="none">
|
||||
<path d="M0 0 H12 C12 6, 17 6, 17 11 C17 16, 12 16, 12 22 H0 Z" fill="#ffedd5"/>
|
||||
<path d="M12 0 H28 V22 H12 C12 16, 17 16, 17 11 C17 6, 12 6, 12 0 Z" fill="#f3e8ff"/>
|
||||
<path d="M12 0 C12 6, 17 6, 17 11 C17 16, 12 16, 12 22" stroke="rgba(0,0,0,0.06)" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<!-- ================= CARD 4 (PASTEL LAVENDER) ================= -->
|
||||
<div class="app-card-pill snap-start shrink-0 w-[295px] h-[155px] bg-[#f3e8ff] p-4 flex flex-col justify-between relative cursor-pointer border border-purple-200/50" onclick="selectCard('Aviso: Viernes de Pizza Artesanal', 'Cupos Limitados')">
|
||||
<!-- Fila superior -->
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-8 h-8 rounded-full bg-white/90 shadow-2xs flex items-center justify-center text-lg">
|
||||
📢
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-purple-950/80 uppercase tracking-wide">
|
||||
aviso cafeteria
|
||||
</span>
|
||||
</div>
|
||||
<span class="text-[10px] font-extrabold px-2 py-0.5 rounded-full bg-purple-200/80 text-purple-900 lowercase">
|
||||
especial
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Título y descripción -->
|
||||
<div>
|
||||
<h4 class="text-sm font-extrabold text-slate-900 tracking-tight leading-snug lowercase">
|
||||
viernes de pizza horneada
|
||||
</h4>
|
||||
<p class="text-[11px] text-slate-600 line-clamp-1 font-medium mt-0.5">
|
||||
pre-órdenes abiertas hasta el jueves 4:00 pm
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Fila inferior: Botón Informativo -->
|
||||
<div class="flex items-center justify-between pt-1">
|
||||
<span class="text-[11px] font-bold text-purple-900">
|
||||
cupos 48/80
|
||||
</span>
|
||||
<button onclick="event.stopPropagation(); showToast('Aviso: Puedes apartar tu porción desde la pestaña Menú')" class="px-3 py-1 rounded-full bg-purple-950 hover:bg-purple-900 active:scale-95 text-white text-[11px] font-bold transition-all shadow-xs flex items-center gap-1 cursor-pointer">
|
||||
<span>ver aviso</span>
|
||||
<span>›</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR PUZZLE 4 (Lavender a Lemon) -->
|
||||
<div class="puzzle-connector">
|
||||
<svg width="28" height="22" viewBox="0 0 28 22" fill="none">
|
||||
<path d="M0 0 H12 C12 6, 17 6, 17 11 C17 16, 12 16, 12 22 H0 Z" fill="#f3e8ff"/>
|
||||
<path d="M12 0 H28 V22 H12 C12 16, 17 16, 17 11 C17 6, 12 6, 12 0 Z" fill="#fef9c3"/>
|
||||
<path d="M12 0 C12 6, 17 6, 17 11 C17 16, 12 16, 12 22" stroke="rgba(0,0,0,0.06)" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<!-- ================= CARD 5 (PASTEL LEMON) ================= -->
|
||||
<div class="app-card-pill snap-start shrink-0 w-[295px] h-[155px] bg-[#fef9c3] p-4 flex flex-col justify-between relative cursor-pointer border border-amber-200/50" onclick="selectCard('Bowl de Fruta & Granola', '1.200')">
|
||||
<!-- Fila superior -->
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-8 h-8 rounded-full bg-white/90 shadow-2xs flex items-center justify-center text-lg">
|
||||
🍎
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-amber-950/80 uppercase tracking-wide">
|
||||
snack saludable
|
||||
</span>
|
||||
</div>
|
||||
<span class="text-[10px] font-extrabold px-2 py-0.5 rounded-full bg-amber-200/80 text-amber-950 lowercase">
|
||||
100% natural
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Título y descripción -->
|
||||
<div>
|
||||
<h4 class="text-sm font-extrabold text-slate-900 tracking-tight leading-snug lowercase">
|
||||
bowl de frutas & miel
|
||||
</h4>
|
||||
<p class="text-[11px] text-slate-600 line-clamp-1 font-medium mt-0.5">
|
||||
fresas, banano, piña, yogurt griego y avena
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Fila inferior -->
|
||||
<div class="flex items-center justify-between pt-1">
|
||||
<div class="flex items-baseline gap-1">
|
||||
<span class="text-xs font-bold text-slate-400">₡</span>
|
||||
<span class="text-base font-black text-slate-900 tracking-tight">1.200</span>
|
||||
</div>
|
||||
<button onclick="event.stopPropagation(); orderItem('Bowl de Frutas', '1.200')" class="px-3 py-1 rounded-full bg-amber-950 hover:bg-amber-900 active:scale-95 text-white text-[11px] font-bold transition-all shadow-xs flex items-center gap-1 cursor-pointer">
|
||||
<span>pedir</span>
|
||||
<span>+</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- INDICADORES DE PÍLDORA (STRUCTURED DOTS) -->
|
||||
<div class="flex items-center justify-center gap-1.5 mt-2">
|
||||
<button onclick="goToSlide(0)" class="carousel-dot w-6 h-1.5 rounded-full bg-slate-900 transition-all cursor-pointer"></button>
|
||||
<button onclick="goToSlide(1)" class="carousel-dot w-2 h-1.5 rounded-full bg-slate-300 transition-all cursor-pointer"></button>
|
||||
<button onclick="goToSlide(2)" class="carousel-dot w-2 h-1.5 rounded-full bg-slate-300 transition-all cursor-pointer"></button>
|
||||
<button onclick="goToSlide(3)" class="carousel-dot w-2 h-1.5 rounded-full bg-slate-300 transition-all cursor-pointer"></button>
|
||||
<button onclick="goToSlide(4)" class="carousel-dot w-2 h-1.5 rounded-full bg-slate-300 transition-all cursor-pointer"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ======================================================== -->
|
||||
<!-- DISCOS CIRCULARES DE ACCIÓN RÁPIDA (ESTILO STRUCTURED) -->
|
||||
<!-- ======================================================== -->
|
||||
<div class="mb-6">
|
||||
<div class="flex items-center justify-between mb-3 px-1">
|
||||
<h3 class="text-xs font-bold text-slate-700 tracking-tight lowercase">
|
||||
accesos directos
|
||||
</h3>
|
||||
<span class="text-[10px] text-slate-400 font-semibold lowercase">toca para abrir</span>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-4 gap-2 text-center">
|
||||
<!-- Disco 1 -->
|
||||
<div onclick="openSinpeModal()" class="flex flex-col items-center gap-1.5 cursor-pointer group">
|
||||
<div class="explore-disk bg-[#d1fae5] flex items-center justify-center text-2xl group-hover:scale-105 transition-transform border border-emerald-200/60">
|
||||
⚡
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-slate-700 lowercase">recarga</span>
|
||||
</div>
|
||||
|
||||
<!-- Disco 2 -->
|
||||
<div onclick="showToast('Carné Escolar QR listo para presentar')" class="flex flex-col items-center gap-1.5 cursor-pointer group">
|
||||
<div class="explore-disk bg-[#e0f2fe] flex items-center justify-center text-2xl group-hover:scale-105 transition-transform border border-sky-200/60">
|
||||
📱
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-slate-700 lowercase">mi qr</span>
|
||||
</div>
|
||||
|
||||
<!-- Disco 3 -->
|
||||
<div onclick="showToast('Mostrando menú completo de la soda escolar')" class="flex flex-col items-center gap-1.5 cursor-pointer group">
|
||||
<div class="explore-disk bg-[#ffedd5] flex items-center justify-center text-2xl group-hover:scale-105 transition-transform border border-orange-200/60">
|
||||
🥪
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-slate-700 lowercase">menú</span>
|
||||
</div>
|
||||
|
||||
<!-- Disco 4 -->
|
||||
<div onclick="showToast('Perfil nutricional: Sin alergias registradas')" class="flex flex-col items-center gap-1.5 cursor-pointer group">
|
||||
<div class="explore-disk bg-[#f3e8ff] flex items-center justify-center text-2xl group-hover:scale-105 transition-transform border border-purple-200/60">
|
||||
❤️
|
||||
</div>
|
||||
<span class="text-[11px] font-bold text-slate-700 lowercase">nutrición</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ======================================================== -->
|
||||
<!-- AGENDA DEL DÍA: TIMELINE VISUAL EN CÁPSULAS CONECTADAS -->
|
||||
<!-- ======================================================== -->
|
||||
<div class="mb-4">
|
||||
<div class="flex items-center justify-between mb-3 px-1">
|
||||
<div>
|
||||
<span class="text-[10px] font-bold tracking-wider uppercase text-slate-400">horario estructurado</span>
|
||||
<h3 class="text-sm font-extrabold text-slate-900 tracking-tight lowercase">
|
||||
timeline de hoy
|
||||
</h3>
|
||||
</div>
|
||||
<span class="text-[11px] font-semibold text-sky-800 bg-white/80 px-2 py-0.5 rounded-full border border-sky-100">
|
||||
4 eventos
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Contenedor con línea vertical continua estilo Structured -->
|
||||
<div class="relative pl-6 space-y-3">
|
||||
<!-- Línea vertical conectora -->
|
||||
<div class="absolute left-2.5 top-3 bottom-3 w-0.5 bg-slate-300/70 rounded-full"></div>
|
||||
|
||||
<!-- Item 1: Entrada y desayuno -->
|
||||
<div class="relative timeline-pill bg-white/85 p-3.5 border border-white flex items-center justify-between cursor-pointer">
|
||||
<div class="absolute -left-6 top-1/2 -translate-y-1/2 w-3.5 h-3.5 rounded-full bg-sky-500 border-2 border-white shadow-xs"></div>
|
||||
<div class="flex items-center gap-2.5">
|
||||
<div class="w-8 h-8 rounded-full bg-[#e0f2fe] flex items-center justify-center text-sm">
|
||||
🥛
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="text-xs font-bold text-slate-900 lowercase leading-tight">desayuno ligero</h5>
|
||||
<p class="text-[10px] text-slate-500 font-medium">07:15 am • cafetería principal</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-[10px] font-bold px-2 py-0.5 rounded-full bg-slate-100 text-slate-500">completado</span>
|
||||
</div>
|
||||
|
||||
<!-- Item 2: Primer recreo (activo) -->
|
||||
<div class="relative timeline-pill bg-[#d1fae5]/90 p-3.5 border border-emerald-200/80 flex items-center justify-between cursor-pointer shadow-xs">
|
||||
<div class="absolute -left-6 top-1/2 -translate-y-1/2 w-3.5 h-3.5 rounded-full bg-emerald-500 border-2 border-white shadow-xs animate-gentle"></div>
|
||||
<div class="flex items-center gap-2.5">
|
||||
<div class="w-8 h-8 rounded-full bg-white flex items-center justify-center text-sm shadow-2xs">
|
||||
🥪
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<h5 class="text-xs font-extrabold text-emerald-950 lowercase leading-tight">primer recreo: retiro combo</h5>
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-emerald-600 animate-ping"></span>
|
||||
</div>
|
||||
<p class="text-[10px] text-emerald-800 font-medium">09:30 am • ventanilla rápida #2</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-[10px] font-black px-2 py-0.5 rounded-full bg-emerald-600 text-white shadow-2xs">en curso</span>
|
||||
</div>
|
||||
|
||||
<!-- Item 3: Almuerzo -->
|
||||
<div class="relative timeline-pill bg-white/85 p-3.5 border border-white flex items-center justify-between cursor-pointer">
|
||||
<div class="absolute -left-6 top-1/2 -translate-y-1/2 w-3.5 h-3.5 rounded-full bg-slate-300 border-2 border-white"></div>
|
||||
<div class="flex items-center gap-2.5">
|
||||
<div class="w-8 h-8 rounded-full bg-[#ffedd5] flex items-center justify-center text-sm">
|
||||
🍛
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="text-xs font-bold text-slate-900 lowercase leading-tight">almuerzo en comedor</h5>
|
||||
<p class="text-[10px] text-slate-500 font-medium">11:45 am • casado con pollo</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-[10px] font-bold px-2 py-0.5 rounded-full bg-orange-100 text-orange-800">reservado</span>
|
||||
</div>
|
||||
|
||||
<!-- Item 4: Segundo Recreo -->
|
||||
<div class="relative timeline-pill bg-white/85 p-3.5 border border-white flex items-center justify-between cursor-pointer">
|
||||
<div class="absolute -left-6 top-1/2 -translate-y-1/2 w-3.5 h-3.5 rounded-full bg-slate-300 border-2 border-white"></div>
|
||||
<div class="flex items-center gap-2.5">
|
||||
<div class="w-8 h-8 rounded-full bg-[#f3e8ff] flex items-center justify-center text-sm">
|
||||
🍎
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="text-xs font-bold text-slate-900 lowercase leading-tight">segundo recreo: snack</h5>
|
||||
<p class="text-[10px] text-slate-500 font-medium">01:45 pm • bowl de frutas</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="text-[10px] font-bold px-2 py-0.5 rounded-full bg-purple-100 text-purple-800">pendiente</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- BARRA INFERIOR FLOTANTE LIQUID GLASS (BOTTOM DOCK) -->
|
||||
<div class="absolute bottom-3 left-4 right-4 z-40">
|
||||
<div class="bg-white/80 backdrop-blur-2xl px-5 py-2.5 rounded-full border border-white/90 shadow-[0_10px_25px_-5px_rgba(0,0,0,0.1)] flex items-center justify-between">
|
||||
|
||||
<!-- Tab Inicio (Activo) -->
|
||||
<button class="flex flex-col items-center gap-0.5 text-sky-800 cursor-pointer">
|
||||
<div class="w-5 h-5 flex items-center justify-center font-bold">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/></svg>
|
||||
</div>
|
||||
<span class="text-[9px] font-extrabold lowercase">inicio</span>
|
||||
</button>
|
||||
|
||||
<!-- Tab Menú -->
|
||||
<button onclick="showToast('Sección Menú y Pedidos')" class="flex flex-col items-center gap-0.5 text-slate-400 hover:text-slate-800 cursor-pointer transition-colors">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h7"/></svg>
|
||||
<span class="text-[9px] font-semibold lowercase">menú</span>
|
||||
</button>
|
||||
|
||||
<!-- Botón Central Destacado (Pagar QR) -->
|
||||
<button onclick="showToast('Activando lector QR para pagar en caja')" class="w-11 h-11 -mt-5 rounded-full bg-slate-900 hover:bg-sky-600 text-white flex items-center justify-center shadow-lg active:scale-90 transition-all cursor-pointer">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v1m6 11h2m-6 0h-2v4m0-11v3m0 0h.01M12 12h4.01M16 20h4M4 12h4m12 0h.01M5 8h2a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1zm12 0h2a1 1 0 001-1V5a1 1 0 00-1-1h-2a1 1 0 00-1 1v2a1 1 0 001 1zM5 20h2a1 1 0 001-1v-2a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1z"/></svg>
|
||||
</button>
|
||||
|
||||
<!-- Tab Agenda -->
|
||||
<button onclick="showToast('Vista de Timeline completo')" class="flex flex-col items-center gap-0.5 text-slate-400 hover:text-slate-800 cursor-pointer transition-colors">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>
|
||||
<span class="text-[9px] font-semibold lowercase">agenda</span>
|
||||
</button>
|
||||
|
||||
<!-- Tab Perfil -->
|
||||
<button onclick="showToast('Perfil y ajustes de cuenta')" class="flex flex-col items-center gap-0.5 text-slate-400 hover:text-slate-800 cursor-pointer transition-colors">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/></svg>
|
||||
<span class="text-[9px] font-semibold lowercase">perfil</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- HOME INDICATOR (BARRA INFERIOR DE IPHONE) -->
|
||||
<div class="absolute bottom-1 left-1/2 -translate-x-1/2 w-32 h-1 bg-slate-900/40 rounded-full z-50 pointer-events-none"></div>
|
||||
|
||||
<!-- TOAST FLOTANTE IN-APP -->
|
||||
<div id="inAppToast" class="absolute top-16 left-6 right-6 z-50 bg-slate-900/90 backdrop-blur-md text-white px-4 py-2.5 rounded-2xl text-xs font-semibold shadow-xl flex items-center justify-between transition-all duration-300 opacity-0 -translate-y-4 pointer-events-none">
|
||||
<span id="inAppToastText">¡Pre-orden agregada con éxito!</span>
|
||||
<span class="text-emerald-400">✓</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PANEL LATERAL EXPLICATIVO Y DETALLES DE DISEÑO -->
|
||||
<div class="w-full max-w-md flex flex-col gap-5">
|
||||
|
||||
<!-- TARJETA EXPLICATIVA DE CÓMO SE ADAPTÓ STRUCTURED A LA APP -->
|
||||
<div class="bg-white/80 backdrop-blur-xl p-6 rounded-3xl border border-white/90 shadow-sm">
|
||||
<div class="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-sky-100 text-sky-800 text-[11px] font-bold mb-3">
|
||||
<span>✨ Claves del Diseño Structured en la App</span>
|
||||
</div>
|
||||
|
||||
<h3 class="text-xl font-extrabold text-slate-900 tracking-tight lowercase mb-2">
|
||||
¿por qué se ve exactamente como structured?
|
||||
</h3>
|
||||
|
||||
<p class="text-sm text-slate-600 font-medium mb-4 leading-relaxed">
|
||||
Structured destaca por tres elementos gráficos inconfundibles que fueron trasladados a la escala real de una pantalla móvil (390px):
|
||||
</p>
|
||||
|
||||
<div class="space-y-3 text-xs">
|
||||
<!-- Punto 1 -->
|
||||
<div class="flex items-start gap-3 p-3 rounded-2xl bg-sky-50/70 border border-sky-100">
|
||||
<span class="text-lg">🧩</span>
|
||||
<div>
|
||||
<strong class="text-slate-900 font-bold block lowercase">1. conectores de rompecabezas vectoriales</strong>
|
||||
<p class="text-slate-600 mt-0.5">En lugar de tarjetas sueltas, cada cápsula se encaja con la siguiente mediante juntas de rompecabezas con colores que coinciden exactamente con ambas tarjetas.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Punto 2 -->
|
||||
<div class="flex items-start gap-3 p-3 rounded-2xl bg-emerald-50/70 border border-emerald-100">
|
||||
<span class="text-lg">🎨</span>
|
||||
<div>
|
||||
<strong class="text-slate-900 font-bold block lowercase">2. paleta pastel de alto contraste</strong>
|
||||
<p class="text-slate-600 mt-0.5">Cielo SiboPay (<code class="bg-white px-1 py-0.5 rounded text-[10px]">#e0f2fe</code>), Menta (<code class="bg-white px-1 py-0.5 rounded text-[10px]">#d1fae5</code>), Melocotón (<code class="bg-white px-1 py-0.5 rounded text-[10px]">#ffedd5</code>) y Lavanda con texto legible y oscuro.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Punto 3 -->
|
||||
<div class="flex items-start gap-3 p-3 rounded-2xl bg-orange-50/70 border border-orange-100">
|
||||
<span class="text-lg">📱</span>
|
||||
<div>
|
||||
<strong class="text-slate-900 font-bold block lowercase">3. snap swipe + micro-interacciones</strong>
|
||||
<p class="text-slate-600 mt-0.5">El usuario puede deslizar con el dedo en el móvil (touch snap) y cada combo se pre-ordena con un solo toque, sincronizado con el timeline escolar del día.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TARJETA DE PRUEBA INTERACTIVA RÁPIDA -->
|
||||
<div class="bg-white/80 backdrop-blur-xl p-5 rounded-3xl border border-white/90 shadow-sm flex flex-col gap-3">
|
||||
<h4 class="text-xs font-bold text-slate-400 uppercase tracking-wider">
|
||||
acciones interactivas para probar ahora
|
||||
</h4>
|
||||
|
||||
<div class="grid grid-cols-2 gap-2 text-xs font-bold">
|
||||
<button onclick="orderItem('Sandwich de Pavo', '1.850')" class="p-2.5 rounded-2xl bg-sky-500 hover:bg-sky-600 text-white transition-all shadow-xs cursor-pointer text-center">
|
||||
🥪 Pre-ordenar Combo
|
||||
</button>
|
||||
<button onclick="openSinpeModal()" class="p-2.5 rounded-2xl bg-emerald-600 hover:bg-emerald-700 text-white transition-all shadow-xs cursor-pointer text-center">
|
||||
⚡ Simular Recarga
|
||||
</button>
|
||||
<button onclick="scrollCarousel(1)" class="p-2.5 rounded-2xl bg-slate-900 hover:bg-slate-800 text-white transition-all shadow-xs cursor-pointer text-center">
|
||||
› Siguiente Cápsula
|
||||
</button>
|
||||
<button onclick="toggleAutoFlow()" class="p-2.5 rounded-2xl bg-amber-500 hover:bg-amber-600 text-white transition-all shadow-xs cursor-pointer text-center">
|
||||
🔄 Desplazamiento
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<!-- MODAL DE SIMULACIÓN SINPE DENTRO DE LA EXPERIENCIA -->
|
||||
<div id="sinpeModal" class="fixed inset-0 z-50 bg-black/40 backdrop-blur-xs flex items-center justify-center p-4 opacity-0 pointer-events-none transition-opacity duration-300">
|
||||
<div class="bg-white rounded-3xl p-6 max-w-sm w-full shadow-2xl border border-slate-100 flex flex-col items-center text-center">
|
||||
<div class="w-14 h-14 rounded-full bg-[#d1fae5] text-emerald-700 flex items-center justify-center text-2xl mb-3 shadow-inner">
|
||||
⚡
|
||||
</div>
|
||||
<h3 class="text-lg font-black text-slate-900 tracking-tight lowercase">recarga rápida sinpe móvil</h3>
|
||||
<p class="text-xs text-slate-500 font-medium mt-1 mb-4">Envía tu comprobante al <strong class="text-slate-800">8888-7777</strong> o digita el monto a abonar a la cuenta de Mateo.</p>
|
||||
|
||||
<div class="w-full flex items-center justify-center gap-2 mb-4">
|
||||
<button onclick="executeReload(2000)" class="flex-1 py-2 rounded-2xl bg-slate-100 hover:bg-emerald-100 text-xs font-bold text-slate-800 transition-colors">₡2.000</button>
|
||||
<button onclick="executeReload(5000)" class="flex-1 py-2 rounded-2xl bg-slate-100 hover:bg-emerald-100 text-xs font-bold text-slate-800 transition-colors">₡5.000</button>
|
||||
<button onclick="executeReload(10000)" class="flex-1 py-2 rounded-2xl bg-slate-100 hover:bg-emerald-100 text-xs font-bold text-slate-800 transition-colors">₡10.000</button>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex items-center gap-2">
|
||||
<button onclick="closeSinpeModal()" class="flex-1 py-2.5 rounded-full bg-slate-100 text-slate-700 text-xs font-bold hover:bg-slate-200 transition-colors cursor-pointer">
|
||||
Cancelar
|
||||
</button>
|
||||
<button onclick="executeReload(5000)" class="flex-1 py-2.5 rounded-full bg-emerald-600 text-white text-xs font-bold hover:bg-emerald-700 transition-colors shadow-sm cursor-pointer">
|
||||
Acreditar ya
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- JAVASCRIPT INTERACTIVO -->
|
||||
<script>
|
||||
const carouselTrack = document.getElementById('appCarouselTrack');
|
||||
const dots = document.querySelectorAll('.carousel-dot');
|
||||
let autoFlowInterval = null;
|
||||
let isAutoFlowing = false;
|
||||
|
||||
// Cambiar color de fondo general y de la app
|
||||
function setTheme(appBg, bodyBg) {
|
||||
document.getElementById('appScreen').style.backgroundColor = appBg;
|
||||
document.getElementById('mainBody').style.backgroundColor = bodyBg;
|
||||
}
|
||||
|
||||
// Navegación con mini flechas
|
||||
function scrollCarousel(direction) {
|
||||
const cardWidth = 323; // Ancho tarjeta + conector
|
||||
carouselTrack.scrollBy({ left: direction * cardWidth, behavior: 'smooth' });
|
||||
setTimeout(updateActiveDot, 300);
|
||||
}
|
||||
|
||||
function goToSlide(index) {
|
||||
const cardWidth = 323;
|
||||
carouselTrack.scrollTo({ left: index * cardWidth, behavior: 'smooth' });
|
||||
updateDots(index);
|
||||
}
|
||||
|
||||
// Actualizar indicador activo
|
||||
function updateActiveDot() {
|
||||
const scrollPos = carouselTrack.scrollLeft;
|
||||
const cardWidth = 323;
|
||||
const activeIndex = Math.min(4, Math.max(0, Math.round(scrollPos / cardWidth)));
|
||||
updateDots(activeIndex);
|
||||
}
|
||||
|
||||
function updateDots(activeIndex) {
|
||||
dots.forEach((dot, idx) => {
|
||||
if (idx === activeIndex) {
|
||||
dot.classList.remove('w-2', 'bg-slate-300');
|
||||
dot.classList.add('w-6', 'bg-slate-900');
|
||||
} else {
|
||||
dot.classList.remove('w-6', 'bg-slate-900');
|
||||
dot.classList.add('w-2', 'bg-slate-300');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
carouselTrack.addEventListener('scroll', () => {
|
||||
clearTimeout(window.scrollTimeout);
|
||||
window.scrollTimeout = setTimeout(updateActiveDot, 100);
|
||||
});
|
||||
|
||||
// Activar o desactivar flujo automático
|
||||
function toggleAutoFlow() {
|
||||
const btn = document.getElementById('btnAutoplay');
|
||||
const icon = document.getElementById('autoplayIcon');
|
||||
const text = document.getElementById('autoplayText');
|
||||
|
||||
if (isAutoFlowing) {
|
||||
clearInterval(autoFlowInterval);
|
||||
isAutoFlowing = false;
|
||||
icon.textContent = '▶';
|
||||
text.textContent = 'Flujo Continuo';
|
||||
btn.classList.remove('bg-emerald-100', 'text-emerald-900');
|
||||
btn.classList.add('bg-white', 'text-slate-700');
|
||||
} else {
|
||||
isAutoFlowing = true;
|
||||
icon.textContent = '⏸';
|
||||
text.textContent = 'Pausar Flujo';
|
||||
btn.classList.remove('bg-white', 'text-slate-700');
|
||||
btn.classList.add('bg-emerald-100', 'text-emerald-900');
|
||||
|
||||
autoFlowInterval = setInterval(() => {
|
||||
const maxScroll = carouselTrack.scrollWidth - carouselTrack.clientWidth;
|
||||
if (carouselTrack.scrollLeft >= maxScroll - 10) {
|
||||
carouselTrack.scrollTo({ left: 0, behavior: 'smooth' });
|
||||
} else {
|
||||
scrollCarousel(1);
|
||||
}
|
||||
}, 3200);
|
||||
}
|
||||
}
|
||||
|
||||
// Mostrar Toast dentro de la pantalla del móvil
|
||||
function showToast(message) {
|
||||
const toast = document.getElementById('inAppToast');
|
||||
const text = document.getElementById('inAppToastText');
|
||||
text.textContent = message;
|
||||
toast.classList.remove('opacity-0', '-translate-y-4', 'pointer-events-none');
|
||||
toast.classList.add('opacity-100', 'translate-y-0');
|
||||
|
||||
clearTimeout(window.toastTimer);
|
||||
window.toastTimer = setTimeout(() => {
|
||||
toast.classList.remove('opacity-100', 'translate-y-0');
|
||||
toast.classList.add('opacity-0', '-translate-y-4', 'pointer-events-none');
|
||||
}, 2600);
|
||||
}
|
||||
|
||||
function orderItem(name, price) {
|
||||
showToast(`¡Pre-orden: ${name} (₡${price}) agendada para el recreo!`);
|
||||
}
|
||||
|
||||
function selectCard(title, price) {
|
||||
showToast(`Detalle: ${title} • ₡${price}`);
|
||||
}
|
||||
|
||||
// Modal de SINPE Móvil
|
||||
function openSinpeModal() {
|
||||
const modal = document.getElementById('sinpeModal');
|
||||
modal.classList.remove('opacity-0', 'pointer-events-none');
|
||||
modal.classList.add('opacity-100');
|
||||
}
|
||||
|
||||
function closeSinpeModal() {
|
||||
const modal = document.getElementById('sinpeModal');
|
||||
modal.classList.remove('opacity-100');
|
||||
modal.classList.add('opacity-0', 'pointer-events-none');
|
||||
}
|
||||
|
||||
function executeReload(amount) {
|
||||
closeSinpeModal();
|
||||
showToast(`¡Recarga de ₡${amount.toLocaleString()} aplicada con éxito!`);
|
||||
}
|
||||
|
||||
// Modo de Vista: Teléfono vs Zoom de Componente
|
||||
function setViewMode(mode) {
|
||||
const frame = document.getElementById('phoneFrame');
|
||||
const btnPhone = document.getElementById('btnViewPhone');
|
||||
const btnComp = document.getElementById('btnViewComponent');
|
||||
|
||||
if (mode === 'component') {
|
||||
frame.classList.remove('w-[390px]', 'h-[812px]', 'rounded-[52px]', 'p-3');
|
||||
frame.classList.add('w-full', 'max-w-xl', 'h-[640px]', 'rounded-3xl', 'p-1', 'scale-105');
|
||||
btnComp.classList.add('bg-white', 'text-slate-800', 'shadow-xs');
|
||||
btnComp.classList.remove('text-slate-500');
|
||||
btnPhone.classList.remove('bg-white', 'text-slate-800', 'shadow-xs');
|
||||
btnPhone.classList.add('text-slate-500');
|
||||
} else {
|
||||
frame.classList.add('w-[390px]', 'h-[812px]', 'rounded-[52px]', 'p-3');
|
||||
frame.classList.remove('w-full', 'max-w-xl', 'h-[640px]', 'rounded-3xl', 'p-1', 'scale-105');
|
||||
btnPhone.classList.add('bg-white', 'text-slate-800', 'shadow-xs');
|
||||
btnPhone.classList.remove('text-slate-500');
|
||||
btnComp.classList.remove('bg-white', 'text-slate-800', 'shadow-xs');
|
||||
btnComp.classList.add('text-slate-500');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,571 @@
|
||||
/* ==========================================================================
|
||||
SIBOPAY DESKTOP WEB EXPERIENCE (desktop.css)
|
||||
Exclusivo para computadoras y monitores de escritorio (>= 1024px).
|
||||
Desacoplado de la PWA móvil: Los celulares (< 1024px) no se ven afectados.
|
||||
Basado en la distribución, paleta de colores y tamaño de botones del Panel Admin.
|
||||
========================================================================== */
|
||||
|
||||
@media (min-width: 860px) {
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
1. CONTENEDORES GENERALES EN PANTALLA COMPLETA
|
||||
-------------------------------------------------------------------------- */
|
||||
.parent-container {
|
||||
max-width: 100vw !important;
|
||||
width: 100% !important;
|
||||
padding: 18px 24px 60px 24px !important;
|
||||
min-height: 100vh;
|
||||
background: var(--bg-main, #f8fafc) !important;
|
||||
box-sizing: border-box !important;
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
max-width: 100vw !important;
|
||||
width: 100% !important;
|
||||
padding: 18px 24px 80px 24px !important;
|
||||
min-height: 100vh;
|
||||
background: var(--bg-main, #f8fafc) !important;
|
||||
box-sizing: border-box !important;
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
2. PORTAL DE PADRES: CABECERA IDÉNTICA A LA DEL ADMINISTRADOR
|
||||
-------------------------------------------------------------------------- */
|
||||
.parent-header {
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
border: 1px solid var(--border, #e2e8f0) !important;
|
||||
border-radius: 18px !important;
|
||||
padding: 14px 18px !important;
|
||||
margin-bottom: 16px !important;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
|
||||
display: flex !important;
|
||||
justify-content: space-between !important;
|
||||
align-items: center !important;
|
||||
flex-wrap: wrap !important;
|
||||
gap: 12px !important;
|
||||
}
|
||||
|
||||
.parent-badge {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
gap: 10px !important;
|
||||
}
|
||||
|
||||
.parent-icon {
|
||||
width: 38px !important;
|
||||
height: 38px !important;
|
||||
min-width: 38px !important;
|
||||
border-radius: 10px !important;
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
font-size: 1.05rem !important;
|
||||
background: var(--bg-main, #f8fafc) !important;
|
||||
color: #0284c7 !important;
|
||||
border: 1.5px solid var(--border, #e2e8f0) !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.parent-badge h2 {
|
||||
font-size: 1.15rem !important;
|
||||
font-weight: 900 !important;
|
||||
margin: 0 !important;
|
||||
color: var(--text-main, #0f172a) !important;
|
||||
line-height: 1.2 !important;
|
||||
}
|
||||
|
||||
#parentLoggedName {
|
||||
font-size: 0.76rem !important;
|
||||
color: #0284c7 !important;
|
||||
font-weight: 700 !important;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.parent-header-actions {
|
||||
display: flex !important;
|
||||
gap: 8px !important;
|
||||
align-items: center !important;
|
||||
}
|
||||
|
||||
.parent-header-actions .theme-toggle-btn {
|
||||
width: 34px !important;
|
||||
height: 34px !important;
|
||||
min-width: 34px !important;
|
||||
border-radius: 9px !important;
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
font-size: 0.95rem !important;
|
||||
box-sizing: border-box !important;
|
||||
margin: 0 !important;
|
||||
border: 1.5px solid var(--border, #e2e8f0) !important;
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
color: var(--text-main, #334155) !important;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
.parent-header-actions .mode-btn {
|
||||
height: 34px !important;
|
||||
font-size: 0.82rem !important;
|
||||
font-weight: 700 !important;
|
||||
border-radius: 9px !important;
|
||||
padding: 0 14px !important;
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
color: var(--text-main, #334155) !important;
|
||||
border: 1.5px solid var(--border, #cbd5e1) !important;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
gap: 6px !important;
|
||||
cursor: pointer !important;
|
||||
transition: all 0.15s ease !important;
|
||||
}
|
||||
|
||||
.parent-header-actions .mode-btn:hover {
|
||||
background: var(--bg-main, #f8fafc) !important;
|
||||
border-color: #94a3b8 !important;
|
||||
color: var(--text-main, #0f172a) !important;
|
||||
}
|
||||
|
||||
.parent-header-actions .logout-btn {
|
||||
height: 34px !important;
|
||||
font-size: 0.82rem !important;
|
||||
font-weight: 800 !important;
|
||||
border-radius: 9px !important;
|
||||
padding: 0 14px !important;
|
||||
background: #fef2f2 !important;
|
||||
color: #991b1b !important;
|
||||
border: 1px solid #fecaca !important;
|
||||
box-shadow: 0 1px 3px rgba(220, 38, 38, 0.08) !important;
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
gap: 6px !important;
|
||||
cursor: pointer !important;
|
||||
transition: all 0.15s ease !important;
|
||||
}
|
||||
|
||||
.parent-header-actions .logout-btn:hover {
|
||||
background: #fee2e2 !important;
|
||||
border-color: #f87171 !important;
|
||||
color: #7f1d1d !important;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
3. PORTAL DE PADRES: CUADRÍCULA DE HIJOS VINCULADOS
|
||||
-------------------------------------------------------------------------- */
|
||||
.parent-children-grid {
|
||||
display: grid !important;
|
||||
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
|
||||
gap: 14px !important;
|
||||
margin-bottom: 18px !important;
|
||||
}
|
||||
|
||||
.parent-child-card {
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
border: 1px solid var(--border, #e2e8f0) !important;
|
||||
border-radius: 16px !important;
|
||||
padding: 14px 16px !important;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
|
||||
cursor: pointer !important;
|
||||
transition: all 0.2s ease !important;
|
||||
}
|
||||
|
||||
.parent-child-card:hover {
|
||||
transform: translateY(-2px) !important;
|
||||
box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12) !important;
|
||||
border-color: #cbd5e1 !important;
|
||||
}
|
||||
|
||||
.parent-child-card.active,
|
||||
.parent-child-card.selected {
|
||||
border: 2px solid #0284c7 !important;
|
||||
background: #f0f9ff !important;
|
||||
box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18), 0 4px 12px rgba(2, 132, 199, 0.12) !important;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
4. PORTAL DE PADRES: DASHBOARD DEL HIJO SELECCIONADO
|
||||
-------------------------------------------------------------------------- */
|
||||
.parent-balance-card-refined {
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
border: 1px solid var(--border, #e2e8f0) !important;
|
||||
border-radius: 18px !important;
|
||||
padding: 18px 22px !important;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
|
||||
margin-bottom: 16px !important;
|
||||
}
|
||||
|
||||
.parent-balance-amount-display span {
|
||||
font-size: 2.2rem !important;
|
||||
font-weight: 900 !important;
|
||||
color: #0284c7 !important;
|
||||
letter-spacing: -0.5px !important;
|
||||
}
|
||||
|
||||
.parent-balance-btn-recharge {
|
||||
height: 34px !important;
|
||||
font-size: 0.82rem !important;
|
||||
font-weight: 700 !important;
|
||||
border-radius: 9px !important;
|
||||
padding: 0 16px !important;
|
||||
background: #0f172a !important;
|
||||
color: #ffffff !important;
|
||||
border: 1px solid #0f172a !important;
|
||||
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12) !important;
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
gap: 6px !important;
|
||||
cursor: pointer !important;
|
||||
transition: all 0.15s ease !important;
|
||||
}
|
||||
|
||||
.parent-balance-btn-recharge:hover {
|
||||
background: #1e293b !important;
|
||||
border-color: #1e293b !important;
|
||||
box-shadow: 0 2px 5px rgba(15, 23, 42, 0.2) !important;
|
||||
}
|
||||
|
||||
.parent-school-selector-pill {
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
border: 1px solid var(--border, #e2e8f0) !important;
|
||||
border-radius: 14px !important;
|
||||
padding: 10px 16px !important;
|
||||
margin-bottom: 16px !important;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
|
||||
}
|
||||
|
||||
.parent-smart-search-card {
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
border: 1px solid var(--border, #e2e8f0) !important;
|
||||
border-radius: 18px !important;
|
||||
padding: 16px 20px !important;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
|
||||
margin-bottom: 16px !important;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
4. PORTAL DE PADRES: LAYOUT DIVIDIDO IZQUIERDA / DERECHA (ESTILO GMAIL)
|
||||
-------------------------------------------------------------------------- */
|
||||
.parent-split-wrapper {
|
||||
display: flex !important;
|
||||
gap: 22px !important;
|
||||
align-items: flex-start !important;
|
||||
width: 100% !important;
|
||||
margin-top: 14px !important;
|
||||
}
|
||||
|
||||
/* Columna Izquierda: Menú de Cajitas (Sidebar Fijo) */
|
||||
.parent-sidebar-boxes {
|
||||
width: 330px !important;
|
||||
min-width: 330px !important;
|
||||
max-width: 330px !important;
|
||||
display: flex !important;
|
||||
flex-direction: column !important;
|
||||
gap: 10px !important;
|
||||
position: sticky !important;
|
||||
top: 20px !important;
|
||||
flex-shrink: 0 !important;
|
||||
}
|
||||
|
||||
.parent-nav-box {
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
border: 1.5px solid var(--border, #e2e8f0) !important;
|
||||
border-radius: 14px !important;
|
||||
padding: 12px 16px !important;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
|
||||
transition: all 0.15s ease !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: space-between !important;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
.parent-nav-box:hover {
|
||||
background: var(--bg-main, #f8fafc) !important;
|
||||
border-color: #cbd5e1 !important;
|
||||
transform: translateX(4px) !important;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
|
||||
}
|
||||
|
||||
.parent-nav-box.active {
|
||||
background: #f0f9ff !important;
|
||||
border-color: #0284c7 !important;
|
||||
border-left: 5px solid #0284c7 !important;
|
||||
box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12) !important;
|
||||
}
|
||||
|
||||
.parent-nav-box.active .parent-nav-box-text strong {
|
||||
color: #0284c7 !important;
|
||||
}
|
||||
|
||||
.parent-nav-box-icon {
|
||||
width: 38px !important;
|
||||
height: 38px !important;
|
||||
min-width: 38px !important;
|
||||
border-radius: 10px !important;
|
||||
background: var(--bg-main, #f8fafc) !important;
|
||||
border: 1px solid var(--border, #e2e8f0) !important;
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
font-size: 1.2rem !important;
|
||||
margin-right: 12px !important;
|
||||
flex-shrink: 0 !important;
|
||||
}
|
||||
|
||||
.parent-nav-box-icon.rose-halo {
|
||||
background: #fff1f2 !important;
|
||||
border-color: #fecdd3 !important;
|
||||
}
|
||||
|
||||
.parent-nav-box-icon.green-halo {
|
||||
background: #f0fdf4 !important;
|
||||
border-color: #bbf7d0 !important;
|
||||
}
|
||||
|
||||
.parent-nav-box-text {
|
||||
flex: 1 !important;
|
||||
min-width: 0 !important;
|
||||
}
|
||||
|
||||
.parent-nav-box-text strong {
|
||||
display: block !important;
|
||||
font-size: 0.88rem !important;
|
||||
color: var(--text-main, #0f172a) !important;
|
||||
font-weight: 800 !important;
|
||||
line-height: 1.25 !important;
|
||||
}
|
||||
|
||||
.parent-nav-box-text span {
|
||||
display: block !important;
|
||||
font-size: 0.72rem !important;
|
||||
color: var(--text-muted, #64748b) !important;
|
||||
margin-top: 2px !important;
|
||||
}
|
||||
|
||||
.parent-nav-arrow {
|
||||
font-size: 1.25rem !important;
|
||||
color: var(--text-muted, #94a3b8) !important;
|
||||
font-weight: 800 !important;
|
||||
margin-left: 8px !important;
|
||||
}
|
||||
|
||||
/* Columna Derecha: Escenario de Contenido (Panel de Información) */
|
||||
.parent-content-stage {
|
||||
flex: 1 !important;
|
||||
min-width: 0 !important;
|
||||
width: calc(100% - 352px) !important;
|
||||
}
|
||||
|
||||
.parent-card {
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
border: 1px solid var(--border, #e2e8f0) !important;
|
||||
border-radius: 18px !important;
|
||||
padding: 22px !important;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
|
||||
margin-bottom: 16px !important;
|
||||
}
|
||||
|
||||
/* Contención ergonómica de formularios y ajustes en desktop (máx 620px) */
|
||||
.parent-subview:not(#parentSubViewMenu):not(#parentSubViewSinpe) .parent-card {
|
||||
max-width: 620px !important;
|
||||
width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
#parentSubViewMenu .parent-card {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
/* Sección Recarga SINPE Móvil en Desktop (Grid de Formulario + Términos) */
|
||||
#parentSubViewSinpe {
|
||||
max-width: 1150px !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#parentSubViewSinpe .parent-sinpe-desktop-grid {
|
||||
display: grid !important;
|
||||
grid-template-columns: minmax(350px, 1.15fr) minmax(320px, 0.85fr) !important;
|
||||
gap: 22px !important;
|
||||
align-items: start !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#parentSubViewSinpe .parent-card {
|
||||
max-width: 100% !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.parent-sinpe-form-card {
|
||||
background: #f0fdf4 !important;
|
||||
border: 1.5px solid #86efac !important;
|
||||
box-shadow: 0 4px 14px rgba(22, 163, 74, 0.08) !important;
|
||||
}
|
||||
|
||||
.parent-sinpe-terms-card {
|
||||
display: block !important;
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
border: 1.5px solid var(--border, #e2e8f0) !important;
|
||||
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03) !important;
|
||||
}
|
||||
|
||||
/* Ocultar botón Volver en escritorio ya que la barra lateral siempre está visible */
|
||||
.parent-subview-back-btn {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.parent-subview-header {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: flex-end !important;
|
||||
margin-bottom: 16px !important;
|
||||
padding-bottom: 12px !important;
|
||||
border-bottom: 1px solid var(--border, #e2e8f0) !important;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
5. PORTAL ESTUDIANTE / SODA (app-container en desktop)
|
||||
-------------------------------------------------------------------------- */
|
||||
.top-bar {
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
border: 1px solid var(--border, #e2e8f0) !important;
|
||||
border-radius: 18px !important;
|
||||
padding: 14px 18px !important;
|
||||
margin-bottom: 16px !important;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.wallet-card {
|
||||
background: var(--card-bg, #ffffff) !important;
|
||||
border: 1px solid var(--border, #e2e8f0) !important;
|
||||
border-radius: 18px !important;
|
||||
padding: 18px 22px !important;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
|
||||
margin: 0 0 16px 0 !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.products-grid {
|
||||
display: grid !important;
|
||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
|
||||
gap: 14px !important;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
6. MODO OSCURO EN DESKTOP (Coherencia exacta con el panel de administración)
|
||||
-------------------------------------------------------------------------- */
|
||||
body.dark-mode .parent-container,
|
||||
body.dark-mode .app-container {
|
||||
background: #0b1120 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-header,
|
||||
body.dark-mode .parent-balance-card-refined,
|
||||
body.dark-mode .parent-school-selector-pill,
|
||||
body.dark-mode .parent-smart-search-card,
|
||||
body.dark-mode .parent-card,
|
||||
body.dark-mode .parent-child-card,
|
||||
body.dark-mode .parent-refined-menu-item,
|
||||
body.dark-mode .top-bar,
|
||||
body.dark-mode .wallet-card {
|
||||
background: #1e293b !important;
|
||||
border-color: #334155 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-icon {
|
||||
background: #0f172a !important;
|
||||
border-color: #334155 !important;
|
||||
color: #38bdf8 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-header-actions .theme-toggle-btn,
|
||||
body.dark-mode .parent-header-actions .mode-btn,
|
||||
body.dark-mode .parent-subview-back-btn {
|
||||
background: #1e293b !important;
|
||||
border-color: #334155 !important;
|
||||
color: #f1f5f9 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-header-actions .mode-btn:hover,
|
||||
body.dark-mode .parent-subview-back-btn:hover {
|
||||
background: #334155 !important;
|
||||
border-color: #475569 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-header-actions .logout-btn {
|
||||
background: rgba(239, 68, 68, 0.12) !important;
|
||||
color: #fca5a5 !important;
|
||||
border-color: rgba(239, 68, 68, 0.3) !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-header-actions .logout-btn:hover {
|
||||
background: rgba(239, 68, 68, 0.2) !important;
|
||||
border-color: #f87171 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-balance-btn-recharge {
|
||||
background: #0284c7 !important;
|
||||
border-color: #0284c7 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-balance-btn-recharge:hover {
|
||||
background: #0369a1 !important;
|
||||
border-color: #0369a1 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-child-card.active,
|
||||
body.dark-mode .parent-child-card.selected {
|
||||
border-color: #38bdf8 !important;
|
||||
background: rgba(2, 132, 199, 0.15) !important;
|
||||
box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-nav-box {
|
||||
background: #1e293b !important;
|
||||
border-color: #334155 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-nav-box:hover {
|
||||
background: #243447 !important;
|
||||
border-color: #475569 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-nav-box.active {
|
||||
background: rgba(2, 132, 199, 0.18) !important;
|
||||
border-color: #38bdf8 !important;
|
||||
border-left: 5px solid #38bdf8 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-nav-box.active .parent-nav-box-text strong {
|
||||
color: #38bdf8 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-nav-box-icon {
|
||||
background: #0f172a !important;
|
||||
border-color: #334155 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-refined-menu-item:hover {
|
||||
background: #0f172a !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-balance-amount-display span {
|
||||
color: #38bdf8 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-sinpe-form-card {
|
||||
background: rgba(6, 78, 59, 0.22) !important;
|
||||
border-color: #059669 !important;
|
||||
}
|
||||
|
||||
body.dark-mode .parent-sinpe-terms-card {
|
||||
background: #1e293b !important;
|
||||
border-color: #334155 !important;
|
||||
color: #f1f5f9 !important;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,8 +3,11 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SiboPay Costa Rica - Plataforma de Pagos y Monedero Escolar Digital</title>
|
||||
<link rel="icon" type="image/png" href="img/sibopay-emblem.png">
|
||||
<title>SiboPay - Sistema Inteligente de Billetera Online</title>
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<link rel="icon" type="image/png" href="/img/sibopay-emblem.png">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<meta name="theme-color" content="#0284c7">
|
||||
<!-- Tailwind CDN & Google Fonts -->
|
||||
<script src="https://www.gstatic.com/antigravity/web/dev/tailwindcss.min.js"></script>
|
||||
<style>
|
||||
@@ -92,13 +95,13 @@
|
||||
|
||||
<!-- Botones de Acción (Derecha) -->
|
||||
<div class="flex items-center gap-3">
|
||||
<button onclick="toggleLoginModal(true)" class="inline-flex items-center gap-2 px-5 py-2.5 rounded-xl text-xs font-black bg-sky-600 text-white hover:bg-sky-500 transition shadow-lg shadow-sky-600/25 active:scale-95">
|
||||
<button onclick="window.location.href='/app'" class="inline-flex items-center gap-2 px-5 py-2.5 rounded-xl text-xs font-black bg-sky-600 text-white hover:bg-sky-500 transition shadow-lg shadow-sky-600/25 active:scale-95 cursor-pointer">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/>
|
||||
<polyline points="10 17 15 12 10 7"/>
|
||||
<line x1="15" x2="3" y1="12" y2="12"/>
|
||||
</svg>
|
||||
<span>Iniciar Sesión / Portal</span>
|
||||
<span>Iniciar Sesión</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -131,7 +134,7 @@
|
||||
|
||||
<!-- Botones de Acción Directa -->
|
||||
<div class="flex flex-col sm:flex-row items-center justify-center lg:justify-start gap-4 pt-2">
|
||||
<button onclick="toggleLoginModal(true)" class="w-full sm:w-auto px-8 py-4 rounded-2xl bg-sky-600 hover:bg-sky-500 text-white font-black text-base shadow-xl shadow-sky-600/30 transition flex items-center justify-center gap-3">
|
||||
<button onclick="window.location.href='/app'" class="w-full sm:w-auto px-8 py-4 rounded-2xl bg-sky-600 hover:bg-sky-500 text-white font-black text-base shadow-xl shadow-sky-600/30 transition flex items-center justify-center gap-3 cursor-pointer">
|
||||
<span>Iniciar Sesión / Portal</span>
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="9 18 15 12 9 6"/></svg>
|
||||
</button>
|
||||
@@ -613,107 +616,42 @@
|
||||
<span class="text-lg font-black text-white">Sibo<span class="text-sky-500">Pay</span></span>
|
||||
<span class="text-[10px] bg-slate-800 text-slate-300 px-2 py-0.5 rounded-full ml-2">Costa Rica 🇨🇷</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-6 font-bold text-slate-300">
|
||||
<div class="flex items-center gap-6 font-bold text-slate-300 flex-wrap justify-center">
|
||||
<a href="#sodas" class="hover:text-white transition">Sodas</a>
|
||||
<a href="#familias" class="hover:text-white transition">Familias</a>
|
||||
<a href="#mep" class="hover:text-white transition">Normativa MEP</a>
|
||||
<button onclick="toggleLoginModal(true)" class="hover:text-white transition cursor-pointer">Iniciar Sesión</button>
|
||||
<button onclick="window.location.href='/app'" class="hover:text-white transition cursor-pointer">Iniciar Sesión</button>
|
||||
<a href="/carnet.html" target="_blank" class="hover:text-white transition">Carnés QR</a>
|
||||
<a href="/eliminar-cuenta" class="hover:text-white transition">Eliminar Cuenta</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col sm:flex-row items-center justify-between gap-4 pt-6 text-[11px] text-slate-500">
|
||||
<p>© 2026 SiboPay Costa Rica. Plataforma y monedero digital escolar.</p>
|
||||
<div class="flex items-center gap-4">
|
||||
<p>© 2026 SiboPay Costa Rica. Sistema inteligente de billetera online.</p>
|
||||
<div class="flex items-center gap-4 flex-wrap justify-center sm:justify-end">
|
||||
<a href="/terminos" class="hover:text-slate-300 transition underline-offset-2 hover:underline">Términos y Condiciones</a>
|
||||
<span>•</span>
|
||||
<a href="/privacidad" class="hover:text-slate-300 transition underline-offset-2 hover:underline">Política de Privacidad</a>
|
||||
<span>•</span>
|
||||
<a href="/eliminar-cuenta" class="hover:text-slate-300 transition underline-offset-2 hover:underline text-rose-400">Eliminación de Cuenta</a>
|
||||
<span>•</span>
|
||||
<span>SINPE Móvil 🇨🇷</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- MODAL FLOTANTE DE INICIO DE SESIÓN INTEGRADO -->
|
||||
<div id="modalLogin" class="fixed inset-0 z-50 bg-slate-950/70 backdrop-blur-sm hidden items-center justify-center p-4">
|
||||
<div class="bg-white rounded-3xl max-w-md w-full p-6 sm:p-8 shadow-2xl relative animate-in fade-in duration-200">
|
||||
|
||||
<!-- Botón Cerrar Modal -->
|
||||
<button onclick="toggleLoginModal(false)" class="absolute top-5 right-5 text-slate-400 hover:text-slate-700 p-1.5 rounded-full hover:bg-slate-100 transition">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
||||
</button>
|
||||
|
||||
<div class="text-center mb-6">
|
||||
<img src="img/sibopay-emblem.png" alt="SiboPay" class="w-16 h-16 object-contain mx-auto mb-3 drop-shadow-lg">
|
||||
<h3 class="text-xl font-black text-slate-900">Ingresar a Sibo<span class="text-sky-600">Pay</span></h3>
|
||||
<p class="text-xs text-slate-500 mt-1">Acceso seguro para padres, estudiantes y personal de soda</p>
|
||||
</div>
|
||||
|
||||
<!-- Selector de Roles con Iconos Finos y Elegantes -->
|
||||
<div class="space-y-2 mb-6">
|
||||
<div class="text-[10px] font-black uppercase tracking-wider text-slate-400 mb-2">Selecciona tu perfil de acceso:</div>
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<button onclick="window.location.href='/index.html'" class="group p-3.5 rounded-2xl border border-slate-200 hover:border-sky-500 bg-white hover:bg-sky-50/50 text-left transition-all shadow-xs flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded-xl bg-sky-50 text-sky-600 border border-sky-100 flex items-center justify-center group-hover:scale-105 group-hover:bg-sky-600 group-hover:text-white transition-all flex-shrink-0">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/>
|
||||
<circle cx="9" cy="7" r="3.5"/>
|
||||
<path d="M22 21v-2a4 4 0 0 0-3-3.87"/>
|
||||
<path d="M16 3.13a3.5 3.5 0 0 1 0 7.75"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs font-black text-slate-800 group-hover:text-sky-600 transition-colors">Padres</div>
|
||||
<div class="text-[10px] font-medium text-slate-400">Portal familiar</div>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<button onclick="window.location.href='/index.html'" class="group p-3.5 rounded-2xl border border-slate-200 hover:border-slate-800 bg-white hover:bg-slate-50 text-left transition-all shadow-xs flex items-center gap-3">
|
||||
<div class="w-10 h-10 rounded-xl bg-slate-100 text-slate-700 border border-slate-200 flex items-center justify-center group-hover:scale-105 group-hover:bg-slate-900 group-hover:text-white transition-all flex-shrink-0">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect width="20" height="14" x="2" y="3" rx="2"/>
|
||||
<line x1="8" x2="16" y1="21" y2="21"/>
|
||||
<line x1="12" x2="12" y1="17" y2="21"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs font-black text-slate-800 group-hover:text-slate-900 transition-colors">Soda / Caja</div>
|
||||
<div class="text-[10px] font-medium text-slate-400">Terminal y cobros</div>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pt-4 border-t border-slate-100 text-center">
|
||||
<a href="/index.html" class="inline-flex items-center justify-center w-full py-3 rounded-xl bg-slate-900 hover:bg-slate-800 text-white font-extrabold text-xs transition">
|
||||
Ir a la Aplicación Principal
|
||||
</a>
|
||||
<p class="text-[11px] text-slate-500 mt-3 leading-normal">
|
||||
Al iniciar sesión, aceptas nuestros
|
||||
<a href="/terminos" target="_blank" class="text-sky-600 font-bold underline underline-offset-2">Términos y Condiciones</a>
|
||||
y nuestra
|
||||
<a href="/privacidad" target="_blank" class="text-sky-600 font-bold underline underline-offset-2">Política de Privacidad</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SCRIPT PARA INTERACTIVIDAD -->
|
||||
<!-- SCRIPT PARA REDIRECCIÓN DIRECTA A LA APP Y SERVICE WORKER -->
|
||||
<script>
|
||||
function toggleLoginModal(show) {
|
||||
const modal = document.getElementById('modalLogin');
|
||||
if (show) {
|
||||
modal.classList.remove('hidden');
|
||||
modal.classList.add('flex');
|
||||
} else {
|
||||
modal.classList.add('hidden');
|
||||
modal.classList.remove('flex');
|
||||
}
|
||||
function toggleLoginModal() {
|
||||
window.location.href = '/app';
|
||||
}
|
||||
|
||||
function quickLoginRole(role) {
|
||||
toggleLoginModal(true);
|
||||
function quickLoginRole() {
|
||||
window.location.href = '/app';
|
||||
}
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/sw.js?v=18.1').catch(err => console.log('SW error:', err));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,300 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Eliminación de Cuenta y Datos | SiboPay</title>
|
||||
<link rel="icon" type="image/png" href="/img/sibopay-emblem.png">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<meta name="theme-color" content="#0284c7">
|
||||
|
||||
<!-- Google Fonts: Plus Jakarta Sans -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- Tailwind CSS CDN -->
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ['Plus Jakarta Sans', 'system-ui', '-apple-system', 'sans-serif'],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
|
||||
background-color: #f8fafc;
|
||||
color: #334155;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
.paper-sheet {
|
||||
background: #ffffff;
|
||||
box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="min-h-screen py-10 px-4 sm:px-6 lg:px-8 flex flex-col justify-between">
|
||||
|
||||
<!-- CONTENEDOR PRINCIPAL -->
|
||||
<main class="max-w-3xl mx-auto w-full">
|
||||
|
||||
<!-- CABECERA DE MARCA Y NAVEGACIÓN -->
|
||||
<header class="mb-8">
|
||||
<div class="flex items-center justify-between gap-4 pb-4 border-b border-slate-100">
|
||||
<a href="/app" id="linkLogoHeader" onclick="manejarRetornoApp(event)" class="inline-flex items-center gap-3 group">
|
||||
<div class="w-10 h-10 rounded-xl bg-sky-50 border border-sky-100 flex items-center justify-center p-2 shadow-sm transition-transform group-hover:scale-105">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" class="w-full h-full object-contain">
|
||||
</div>
|
||||
<div class="text-left">
|
||||
<span class="text-xl font-black tracking-tight text-slate-900 block leading-tight">Sibo<span class="text-sky-600">Pay</span></span>
|
||||
<span class="text-[10px] font-bold text-slate-500 uppercase tracking-wider block">Privacidad y Protección de Datos</span>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<a id="btnNavReturn" href="/app" onclick="manejarRetornoApp(event)" class="inline-flex items-center gap-1.5 px-4 py-2 rounded-xl text-xs font-black text-slate-800 bg-white border border-slate-200 hover:bg-slate-50 transition shadow-sm cursor-pointer">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m15 18-6-6 6-6"/></svg>
|
||||
<span id="txtNavReturn">Volver a la App</span>
|
||||
</a>
|
||||
<a id="btnNavLanding" href="/" class="hidden inline-flex items-center gap-1 px-3 py-2 rounded-xl text-xs font-semibold text-slate-500 hover:text-slate-800 transition">
|
||||
<span>Inicio</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center mt-6">
|
||||
<h1 class="text-2xl sm:text-3xl font-black text-slate-900 tracking-tight">
|
||||
Eliminación de Cuenta y Supresión de Datos
|
||||
</h1>
|
||||
<p class="text-sm sm:text-base text-slate-600 mt-2 max-w-xl mx-auto">
|
||||
Transparencia y control absoluto sobre tu información conforme a las políticas de privacidad y requisitos de Google Play Store y Apple App Store.
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- TARJETA INFORMATIVA PRINCIPAL -->
|
||||
<div class="paper-sheet p-6 sm:p-10 space-y-8">
|
||||
|
||||
<!-- SECCIÓN 1: CÓMO ELIMINAR DIRECTAMENTE DESDE LA APP -->
|
||||
<section class="border-b border-slate-100 pb-8">
|
||||
<div class="flex items-center gap-3 mb-4">
|
||||
<div class="w-8 h-8 rounded-lg bg-sky-100 text-sky-700 flex items-center justify-center font-black text-sm">
|
||||
1
|
||||
</div>
|
||||
<h2 class="text-lg font-black text-slate-900">
|
||||
¿Cómo eliminar tu cuenta desde la app móvil SiboPay?
|
||||
</h2>
|
||||
</div>
|
||||
<p class="text-sm text-slate-600 leading-relaxed mb-4">
|
||||
Si tienes acceso a tu cuenta activa, puedes solicitar la baja inmediata directamente desde tu celular en 3 sencillos pasos:
|
||||
</p>
|
||||
<ol class="space-y-3 text-sm text-slate-700 list-decimal list-inside pl-2">
|
||||
<li class="pl-1">
|
||||
<span class="font-bold text-slate-900">Abre SiboPay</span> e ingresa a tu perfil o panel (Portal de Padres o Estudiante).
|
||||
</li>
|
||||
<li class="pl-1">
|
||||
Toca el botón o icono de <span class="font-bold text-slate-900">⚙️ Mi Cuenta / Ajustes de Privacidad</span>.
|
||||
</li>
|
||||
<li class="pl-1">
|
||||
En la sección inferior, presiona el botón rojo <span class="font-bold text-rose-700">"Eliminar Cuenta y Datos"</span> y confirma tu contraseña de acceso para verificar tu identidad.
|
||||
</li>
|
||||
</ol>
|
||||
<div class="mt-4 p-3.5 bg-sky-50/70 border border-sky-100 rounded-xl text-xs text-sky-800 flex items-start gap-2.5">
|
||||
<svg class="w-4 h-4 text-sky-600 mt-0.5 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
||||
<span>El borrado se ejecuta de forma instantánea en nuestros servidores y cerrarás sesión automáticamente en todos tus dispositivos.</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- SECCIÓN 2: FORMULARIO WEB SI DESINSTALASTE LA APP -->
|
||||
<section class="border-b border-slate-100 pb-8">
|
||||
<div class="flex items-center gap-3 mb-4">
|
||||
<div class="w-8 h-8 rounded-lg bg-amber-100 text-amber-800 flex items-center justify-center font-black text-sm">
|
||||
2
|
||||
</div>
|
||||
<h2 class="text-lg font-black text-slate-900">
|
||||
¿Ya desinstalaste la app? Solicita el borrado aquí
|
||||
</h2>
|
||||
</div>
|
||||
<p class="text-sm text-slate-600 leading-relaxed mb-5">
|
||||
Si ya no tienes la aplicación instalada en tu teléfono o no recuerdas tu contraseña, ingresa los datos con los que te registraste y nuestro equipo de seguridad procesará la eliminación:
|
||||
</p>
|
||||
|
||||
<form id="formWebDeletion" onsubmit="enviarSolicitudWeb(event)" class="bg-slate-50 border border-slate-200/80 rounded-2xl p-5 sm:p-6 space-y-4">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-slate-700 mb-1.5 uppercase tracking-wide">
|
||||
Nombre de Usuario, Correo o Teléfono Registrado:
|
||||
</label>
|
||||
<input type="text" id="delIdentificador" required placeholder="Ej: maria.padre o 8888-8888 o [email protected]" class="w-full px-4 py-2.5 bg-white border border-slate-200 rounded-xl text-sm font-semibold text-slate-900 focus:outline-none focus:ring-2 focus:ring-sky-500/20 focus:border-sky-500">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-slate-700 mb-1.5 uppercase tracking-wide">
|
||||
Motivo de la solicitud (Opcional):
|
||||
</label>
|
||||
<select id="delMotivo" class="w-full px-4 py-2.5 bg-white border border-slate-200 rounded-xl text-sm font-semibold text-slate-900 focus:outline-none focus:ring-2 focus:ring-sky-500/20 focus:border-sky-500">
|
||||
<option value="cambio_institucion">Mi hijo(a) ya no asiste a esta institución</option>
|
||||
<option value="ya_no_uso">Ya no utilizo el servicio de soda escolar</option>
|
||||
<option value="privacidad">Preferencia de privacidad y protección de datos</option>
|
||||
<option value="otro">Otro motivo</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="pt-2 flex flex-col sm:flex-row items-center gap-3">
|
||||
<button type="submit" id="btnSubmitWebDel" class="w-full sm:w-auto px-6 py-3 bg-rose-600 hover:bg-rose-700 text-white font-black text-sm rounded-xl shadow-sm transition-all flex items-center justify-center gap-2 cursor-pointer">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/></svg>
|
||||
<span>Solicitar Eliminación Definitiva</span>
|
||||
</button>
|
||||
<button type="button" onclick="manejarRetornoApp(event)" class="w-full sm:w-auto px-6 py-3 bg-white border border-slate-300 hover:bg-slate-100 text-slate-700 font-bold text-sm rounded-xl transition-all flex items-center justify-center gap-2 cursor-pointer">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m15 18-6-6 6-6"/></svg>
|
||||
<span class="txtRetornoApp">Cancelar y Regresar a la Aplicación</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="msgWebResult" class="hidden p-4 rounded-xl text-xs font-bold mt-3"></div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<!-- SECCIÓN 3: POLÍTICA DE RETENCIÓN Y QUÉ DATOS SE SUPRIMEN -->
|
||||
<section class="space-y-4">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="w-8 h-8 rounded-lg bg-emerald-100 text-emerald-800 flex items-center justify-center font-black text-sm">
|
||||
3
|
||||
</div>
|
||||
<h2 class="text-lg font-black text-slate-900">
|
||||
Detalle de Datos Suprimidos y Retención Legal
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 pt-1">
|
||||
<div class="bg-rose-50/70 border border-rose-100 rounded-xl p-4">
|
||||
<h3 class="text-xs font-black text-rose-800 uppercase tracking-wider mb-2 flex items-center gap-1.5">
|
||||
<span>🗑️</span> Datos que se eliminan de inmediato
|
||||
</h3>
|
||||
<ul class="text-xs text-rose-950/80 space-y-1.5 list-disc list-inside">
|
||||
<li>Nombre completo y credenciales de acceso</li>
|
||||
<li>Contraseña cifrada (hash)</li>
|
||||
<li>Correo electrónico y teléfono personal</li>
|
||||
<li>Vinculación y permisos de supervisión parental</li>
|
||||
<li>Tokens de notificaciones Web Push de tus celulares</li>
|
||||
<li>Preferencias de diseño y personalización</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="bg-slate-50 border border-slate-200/80 rounded-xl p-4">
|
||||
<h3 class="text-xs font-black text-slate-700 uppercase tracking-wider mb-2 flex items-center gap-1.5">
|
||||
<span>⚖️</span> Retención contable y tributaria
|
||||
</h3>
|
||||
<p class="text-xs text-slate-600 leading-relaxed">
|
||||
Conforme a la legislación comercial y tributaria de Costa Rica y normativas de auditoría escolar, los comprobantes de transacciones financieras y recargas previas se conservan de forma disociada y completamente anónima como respaldo contable de la soda concesionaria, sin ningún enlace a tu identidad personal.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- PIE DE PÁGINA -->
|
||||
<footer class="text-center text-xs text-slate-400 mt-8 space-y-3">
|
||||
<div class="flex justify-center pb-2">
|
||||
<a href="/app" onclick="manejarRetornoApp(event)" class="inline-flex items-center gap-2 px-5 py-2.5 rounded-xl text-xs font-black text-white bg-sky-600 hover:bg-sky-700 transition shadow-sm cursor-pointer">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m15 18-6-6 6-6"/></svg>
|
||||
<span class="txtRetornoApp">Regresar a la Aplicación SiboPay</span>
|
||||
</a>
|
||||
</div>
|
||||
<p>SiboPay Costa Rica • Sistema inteligente de billetera online</p>
|
||||
<p>Consultas sobre privacidad y derechos ARCO: <a href="mailto:[email protected]" class="text-sky-600 hover:underline font-bold">[email protected]</a></p>
|
||||
<div class="pt-1">
|
||||
<a href="/legal?from=app" class="text-slate-500 hover:text-slate-800 underline mx-2 font-semibold">Términos y Condiciones</a>
|
||||
<span>•</span>
|
||||
<a href="/privacidad?from=app" class="text-slate-500 hover:text-slate-800 underline mx-2 font-semibold">Política de Privacidad</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
|
||||
<script>
|
||||
function detectarOrigen() {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const isFromApp = params.get('from') === 'app' || document.referrer.includes('/app') || document.referrer.includes('sibopay.com/app');
|
||||
const btnReturn = document.getElementById('btnNavReturn');
|
||||
const txtReturn = document.getElementById('txtNavReturn');
|
||||
const btnLanding = document.getElementById('btnNavLanding');
|
||||
const txtsAll = document.querySelectorAll('.txtRetornoApp');
|
||||
|
||||
if (isFromApp) {
|
||||
if (txtReturn) txtReturn.textContent = 'Volver a la App';
|
||||
if (btnReturn) btnReturn.href = '/app';
|
||||
if (btnLanding) btnLanding.classList.add('hidden');
|
||||
txtsAll.forEach(el => el.textContent = 'Cancelar y Regresar a la Aplicación');
|
||||
} else {
|
||||
if (txtReturn) txtReturn.textContent = 'Ingresar a la App';
|
||||
if (btnReturn) btnReturn.href = '/app';
|
||||
if (btnLanding) btnLanding.classList.remove('hidden');
|
||||
txtsAll.forEach(el => el.textContent = 'Ir a la Aplicación SiboPay');
|
||||
}
|
||||
}
|
||||
|
||||
function manejarRetornoApp(e) {
|
||||
if (e) e.preventDefault();
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const isFromApp = params.get('from') === 'app' || document.referrer.includes('/app') || document.referrer.includes('sibopay.com/app');
|
||||
|
||||
if (isFromApp && window.history.length > 1) {
|
||||
window.history.back();
|
||||
setTimeout(() => {
|
||||
window.location.href = '/app';
|
||||
}, 250);
|
||||
} else {
|
||||
window.location.href = '/app';
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('DOMContentLoaded', detectarOrigen);
|
||||
|
||||
async function enviarSolicitudWeb(e) {
|
||||
e.preventDefault();
|
||||
const btn = document.getElementById('btnSubmitWebDel');
|
||||
const msg = document.getElementById('msgWebResult');
|
||||
const id = document.getElementById('delIdentificador').value.trim();
|
||||
const motivo = document.getElementById('delMotivo').value;
|
||||
|
||||
if (!id) return;
|
||||
|
||||
btn.disabled = true;
|
||||
btn.innerHTML = 'Procesando solicitud...';
|
||||
msg.className = 'hidden';
|
||||
|
||||
try {
|
||||
const res = await fetch('/api/public/solicitar-eliminacion-cuenta', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ identificador: id, motivo: motivo, confirmacion: true })
|
||||
});
|
||||
const data = await res.json();
|
||||
|
||||
msg.className = 'p-4 rounded-xl text-xs font-bold mt-3 ' + (res.ok ? 'bg-emerald-50 text-emerald-800 border border-emerald-200' : 'bg-rose-50 text-rose-800 border border-rose-200');
|
||||
msg.textContent = data.mensaje || data.error || 'Solicitud procesada correctamente.';
|
||||
|
||||
if (res.ok) {
|
||||
document.getElementById('formWebDeletion').reset();
|
||||
}
|
||||
} catch (err) {
|
||||
msg.className = 'p-4 rounded-xl text-xs font-bold mt-3 bg-rose-50 text-rose-800 border border-rose-200';
|
||||
msg.textContent = 'Error de conexión: ' + err.message;
|
||||
} finally {
|
||||
btn.disabled = false;
|
||||
btn.innerHTML = '<span>Solicitar Eliminación Definitiva</span>';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 890 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 4.0 MiB |
|
After Width: | Height: | Size: 984 KiB |
|
After Width: | Height: | Size: 4.9 MiB |
|
After Width: | Height: | Size: 760 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 726 KiB |
|
After Width: | Height: | Size: 710 KiB |
|
After Width: | Height: | Size: 646 KiB |
|
After Width: | Height: | Size: 634 KiB |
|
After Width: | Height: | Size: 493 KiB |
|
After Width: | Height: | Size: 641 KiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 655 KiB |
|
After Width: | Height: | Size: 742 KiB |
|
After Width: | Height: | Size: 2.5 MiB |
|
After Width: | Height: | Size: 642 KiB |
|
After Width: | Height: | Size: 891 KiB |
|
After Width: | Height: | Size: 5.2 MiB |
|
After Width: | Height: | Size: 404 KiB |
|
After Width: | Height: | Size: 2.5 MiB |
|
After Width: | Height: | Size: 3.3 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 730 KiB |
|
After Width: | Height: | Size: 720 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 712 KiB |
|
After Width: | Height: | Size: 753 KiB |
@@ -0,0 +1,542 @@
|
||||
// ========================================================
|
||||
// SISTEMA GLOBAL DE MODALES Y DIÁLOGOS DE SIBOPAY
|
||||
// Reemplaza window.alert y window.confirm por modales integrados de la página
|
||||
// ========================================================
|
||||
(function() {
|
||||
function ensureDialogDom() {
|
||||
let backdrop = document.getElementById('appGlobalDialogBackdrop');
|
||||
if (!backdrop) {
|
||||
backdrop = document.createElement('div');
|
||||
backdrop.id = 'appGlobalDialogBackdrop';
|
||||
backdrop.className = 'app-dialog-backdrop';
|
||||
backdrop.innerHTML = `
|
||||
<div class="app-dialog-card" onclick="event.stopPropagation()">
|
||||
<div class="app-dialog-icon info" id="appGlobalDialogIcon">ℹ️</div>
|
||||
<h3 class="app-dialog-title" id="appGlobalDialogTitle">Aviso</h3>
|
||||
<p class="app-dialog-message" id="appGlobalDialogMessage"></p>
|
||||
<div class="app-dialog-actions" id="appGlobalDialogActions">
|
||||
<button type="button" class="app-dialog-btn app-dialog-btn-primary" id="appGlobalDialogBtnConfirm">Entendido</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
document.body.appendChild(backdrop);
|
||||
|
||||
// Cerrar con Escape o confirmar con Enter
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (!backdrop.classList.contains('active')) return;
|
||||
if (e.key === 'Escape') {
|
||||
const cancelBtn = document.getElementById('appGlobalDialogBtnCancel');
|
||||
if (cancelBtn) {
|
||||
cancelBtn.click();
|
||||
} else {
|
||||
const confirmBtn = document.getElementById('appGlobalDialogBtnConfirm');
|
||||
if (confirmBtn) confirmBtn.click();
|
||||
}
|
||||
} else if (e.key === 'Enter') {
|
||||
const confirmBtn = document.getElementById('appGlobalDialogBtnConfirm');
|
||||
if (confirmBtn) confirmBtn.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
return backdrop;
|
||||
}
|
||||
|
||||
function showAppAlert(options) {
|
||||
return new Promise((resolve) => {
|
||||
const opts = typeof options === 'string' ? { message: options } : (options || {});
|
||||
const backdrop = ensureDialogDom();
|
||||
const iconEl = document.getElementById('appGlobalDialogIcon');
|
||||
const titleEl = document.getElementById('appGlobalDialogTitle');
|
||||
const msgEl = document.getElementById('appGlobalDialogMessage');
|
||||
const actionsEl = document.getElementById('appGlobalDialogActions');
|
||||
|
||||
let type = opts.type || 'info';
|
||||
let title = opts.title;
|
||||
let icon = 'ℹ️';
|
||||
|
||||
// Auto-detección por contenido si es alerta genérica
|
||||
const msgLower = (opts.message || '').toLowerCase();
|
||||
if (!opts.type) {
|
||||
if (msgLower.includes('éxito') || msgLower.includes('aprobada') || msgLower.includes('guardad') || msgLower.includes('bienvenido') || msgLower.includes('confirmad')) {
|
||||
type = 'success';
|
||||
} else if (msgLower.includes('error') || msgLower.includes('falló') || msgLower.includes('rechazad') || msgLower.includes('denegad')) {
|
||||
type = 'error';
|
||||
} else if (msgLower.includes('atención') || msgLower.includes('cuidado') || msgLower.includes('límite') || msgLower.includes('bloquead')) {
|
||||
type = 'warning';
|
||||
}
|
||||
}
|
||||
|
||||
if (type === 'success') icon = '✅';
|
||||
else if (type === 'error' || type === 'danger') icon = '🚫';
|
||||
else if (type === 'warning') icon = '⚠️';
|
||||
else if (type === 'question') icon = '❓';
|
||||
else icon = 'ℹ️';
|
||||
|
||||
if (!title) {
|
||||
if (type === 'success') title = '¡Operación Exitosa!';
|
||||
else if (type === 'error' || type === 'danger') title = 'Aviso del Sistema';
|
||||
else if (type === 'warning') title = 'Atención';
|
||||
else title = 'Información';
|
||||
}
|
||||
|
||||
iconEl.className = `app-dialog-icon ${type}`;
|
||||
iconEl.textContent = icon;
|
||||
titleEl.textContent = title;
|
||||
msgEl.textContent = opts.message || '';
|
||||
|
||||
const btnConfirmText = opts.confirmText || 'Entendido';
|
||||
const btnClass = type === 'success' ? 'app-dialog-btn-success' : (type === 'error' || type === 'danger' ? 'app-dialog-btn-danger' : 'app-dialog-btn-primary');
|
||||
|
||||
actionsEl.innerHTML = `
|
||||
<button type="button" class="app-dialog-btn ${btnClass}" id="appGlobalDialogBtnConfirm">${btnConfirmText}</button>
|
||||
`;
|
||||
|
||||
const confirmBtn = document.getElementById('appGlobalDialogBtnConfirm');
|
||||
confirmBtn.onclick = () => {
|
||||
backdrop.classList.remove('active');
|
||||
resolve(true);
|
||||
};
|
||||
|
||||
backdrop.classList.add('active');
|
||||
setTimeout(() => confirmBtn.focus(), 50);
|
||||
});
|
||||
}
|
||||
|
||||
function showAppConfirm(options) {
|
||||
return new Promise((resolve) => {
|
||||
const opts = typeof options === 'string' ? { message: options } : (options || {});
|
||||
const backdrop = ensureDialogDom();
|
||||
const iconEl = document.getElementById('appGlobalDialogIcon');
|
||||
const titleEl = document.getElementById('appGlobalDialogTitle');
|
||||
const msgEl = document.getElementById('appGlobalDialogMessage');
|
||||
const actionsEl = document.getElementById('appGlobalDialogActions');
|
||||
|
||||
const isDanger = Boolean(opts.danger || opts.type === 'danger' || (opts.message || '').toLowerCase().includes('eliminar') || (opts.message || '').toLowerCase().includes('revertir'));
|
||||
const type = isDanger ? 'danger' : (opts.type || 'question');
|
||||
const icon = isDanger ? '⚠️' : '❓';
|
||||
const title = opts.title || (isDanger ? '¿Confirmar Acción?' : 'Confirmación Requerida');
|
||||
|
||||
iconEl.className = `app-dialog-icon ${type}`;
|
||||
iconEl.textContent = icon;
|
||||
titleEl.textContent = title;
|
||||
msgEl.textContent = opts.message || '';
|
||||
|
||||
const btnConfirmText = opts.confirmText || (isDanger ? 'Sí, continuar' : 'Confirmar');
|
||||
const btnCancelText = opts.cancelText || 'Cancelar';
|
||||
const btnClass = isDanger ? 'app-dialog-btn-danger' : 'app-dialog-btn-primary';
|
||||
|
||||
actionsEl.innerHTML = `
|
||||
<button type="button" class="app-dialog-btn app-dialog-btn-secondary" id="appGlobalDialogBtnCancel">${btnCancelText}</button>
|
||||
<button type="button" class="app-dialog-btn ${btnClass}" id="appGlobalDialogBtnConfirm">${btnConfirmText}</button>
|
||||
`;
|
||||
|
||||
const confirmBtn = document.getElementById('appGlobalDialogBtnConfirm');
|
||||
const cancelBtn = document.getElementById('appGlobalDialogBtnCancel');
|
||||
|
||||
confirmBtn.onclick = () => {
|
||||
backdrop.classList.remove('active');
|
||||
resolve(true);
|
||||
};
|
||||
cancelBtn.onclick = () => {
|
||||
backdrop.classList.remove('active');
|
||||
resolve(false);
|
||||
};
|
||||
|
||||
backdrop.classList.add('active');
|
||||
setTimeout(() => confirmBtn.focus(), 50);
|
||||
});
|
||||
}
|
||||
|
||||
// Exportar globalmente
|
||||
window.showAppAlert = showAppAlert;
|
||||
window.showAppConfirm = showAppConfirm;
|
||||
|
||||
// Interceptar window.alert nativo para que cualquier alerta existente se convierta en modal de la app
|
||||
window.alert = function(msg) {
|
||||
return showAppAlert(msg);
|
||||
};
|
||||
|
||||
// ========================================================
|
||||
// LÓGICA DEL MODAL DE RECHAZO DE SINPE (COMPARTIDO POS & ADMIN)
|
||||
// ========================================================
|
||||
let currentSinpeRejectData = null;
|
||||
|
||||
function ensureSinpeRejectModalDom() {
|
||||
let modal = document.getElementById('modalRechazarSinpe');
|
||||
if (!modal) {
|
||||
modal = document.createElement('div');
|
||||
modal.className = 'modal-qr-backdrop';
|
||||
modal.id = 'modalRechazarSinpe';
|
||||
modal.style.cssText = 'display: none; z-index: 99999;';
|
||||
modal.innerHTML = `
|
||||
<div class="modal-qr-card" onclick="event.stopPropagation()" style="max-width: 440px; text-align: left; padding: 22px; border-radius: 18px;">
|
||||
<!-- Encabezado -->
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; border-bottom: 1.5px solid var(--border, #e2e8f0); padding-bottom: 10px; margin-bottom: 14px;">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<span style="font-size: 1.3rem;">🚫</span>
|
||||
<div>
|
||||
<h3 style="margin: 0; font-size: 1.05rem; font-weight: 900; color: #991b1b;">Rechazar Recarga SINPE</h3>
|
||||
<span style="font-size: 0.72rem; color: var(--text-muted, #64748b);">Trazabilidad detallada para la soda y el padre</span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" onclick="cerrarModalRechazoSinpe()" style="background: none; border: none; font-size: 1.3rem; color: var(--text-muted, #64748b); cursor: pointer; padding: 4px;">✕</button>
|
||||
</div>
|
||||
|
||||
<!-- Resumen de Solicitud -->
|
||||
<div style="background: rgba(148, 163, 184, 0.08); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 0.80rem; line-height: 1.45;">
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<span style="color: var(--text-muted, #64748b);">Estudiante:</span>
|
||||
<strong id="rechazoSinpeEstudiante" style="color: var(--text-main, #0f172a);">-</strong>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 3px;">
|
||||
<span style="color: var(--text-muted, #64748b);">Monto Solicitado:</span>
|
||||
<strong id="rechazoSinpeMonto" style="color: #0284c7; font-size: 0.92rem;">₡0</strong>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 3px;">
|
||||
<span style="color: var(--text-muted, #64748b);">Comprobante / Cód:</span>
|
||||
<strong id="rechazoSinpeComprobante" style="color: var(--text-main, #334155);">-</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Motivo de Rechazo (Opciones Rápidas) -->
|
||||
<label style="display: block; font-size: 0.78rem; font-weight: 800; color: var(--text-main, #0f172a); margin-bottom: 6px;">
|
||||
Selecciona el motivo del rechazo:
|
||||
</label>
|
||||
<div style="display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px;">
|
||||
<label class="sinpe-reject-option" style="display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid var(--border, #e2e8f0); border-radius: 9px; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: var(--text-main, #334155);">
|
||||
<input type="radio" name="sinpeRejectReason" value="fondos_no_recibidos" checked onchange="toggleSinpeRejectInputs()">
|
||||
<span>🚫 Fondos no recibidos en cuenta bancaria</span>
|
||||
</label>
|
||||
<label class="sinpe-reject-option" style="display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid var(--border, #e2e8f0); border-radius: 9px; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: var(--text-main, #334155);">
|
||||
<input type="radio" name="sinpeRejectReason" value="monto_no_coincide" onchange="toggleSinpeRejectInputs()">
|
||||
<span>⚠️ Monto no coincide con comprobante</span>
|
||||
</label>
|
||||
<label class="sinpe-reject-option" style="display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid var(--border, #e2e8f0); border-radius: 9px; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: var(--text-main, #334155);">
|
||||
<input type="radio" name="sinpeRejectReason" value="comprobante_invalido" onchange="toggleSinpeRejectInputs()">
|
||||
<span>📄 Comprobante falso, duplicado o ilegible</span>
|
||||
</label>
|
||||
<label class="sinpe-reject-option" style="display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid var(--border, #e2e8f0); border-radius: 9px; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: var(--text-main, #334155);">
|
||||
<input type="radio" name="sinpeRejectReason" value="telefono_no_coincide" onchange="toggleSinpeRejectInputs()">
|
||||
<span>📱 Teléfono o destinatario no coincide</span>
|
||||
</label>
|
||||
<label class="sinpe-reject-option" style="display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid var(--border, #e2e8f0); border-radius: 9px; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: var(--text-main, #334155);">
|
||||
<input type="radio" name="sinpeRejectReason" value="otro" onchange="toggleSinpeRejectInputs()">
|
||||
<span>✏️ Otro motivo personalizado</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Campo de Monto Real cuando el monto no coincide -->
|
||||
<div id="sinpeRejectMontoContainer" style="display: none; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px; margin-bottom: 12px;">
|
||||
<label style="display: block; font-size: 0.75rem; font-weight: 800; color: #92400e; margin-bottom: 4px;">
|
||||
¿De cuánto era realmente el SINPE recibido? (₡):
|
||||
</label>
|
||||
<input type="number" id="sinpeRejectMontoReal" placeholder="Ej: 1000" style="width: 100%; height: 36px; padding: 0 10px; border: 1.5px solid #fcd34d; border-radius: 8px; font-size: 0.88rem; font-weight: 800; color: #92400e; box-sizing: border-box;" oninput="updateSinpeRejectPreview()">
|
||||
<span id="sinpeRejectMontoPreview" style="display: block; font-size: 0.72rem; color: #b45309; margin-top: 4px; font-weight: 600;">
|
||||
Se intentaron recargar ₡0 pero el SINPE fue de ₡0
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Notas o detalles adicionales -->
|
||||
<div style="margin-bottom: 16px;">
|
||||
<label style="display: block; font-size: 0.75rem; font-weight: 700; color: var(--text-muted, #64748b); margin-bottom: 4px;">
|
||||
Detalle u observación adicional (opcional):
|
||||
</label>
|
||||
<input type="text" id="sinpeRejectNotasExtra" placeholder="Ej: Fondos no figuran en estado bancario al corte" style="width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border, #cbd5e1); border-radius: 8px; font-size: 0.80rem; box-sizing: border-box;">
|
||||
</div>
|
||||
|
||||
<!-- Botones de Acción -->
|
||||
<div style="display: flex; gap: 8px; justify-content: flex-end;">
|
||||
<button type="button" onclick="cerrarModalRechazoSinpe()" class="btn-saas btn-saas-outline" style="height: 36px; padding: 0 14px; font-weight: 700; cursor: pointer;">
|
||||
Cancelar
|
||||
</button>
|
||||
<button type="button" id="btnConfirmarRechazoSinpe" onclick="confirmarRechazoSinpeModal()" class="btn-saas" style="height: 36px; padding: 0 16px; background: #dc2626; color: #ffffff; border: 1px solid #dc2626; font-weight: 800; cursor: pointer;">
|
||||
Confirmar Rechazo
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
} else if (modal.parentElement !== document.body) {
|
||||
document.body.appendChild(modal);
|
||||
}
|
||||
return modal;
|
||||
}
|
||||
|
||||
window.abrirModalRechazoSinpe = function({ id, estudiante_nombre, monto_colones, comprobante, onConfirm }) {
|
||||
currentSinpeRejectData = {
|
||||
id,
|
||||
estudiante_nombre: estudiante_nombre || 'Estudiante',
|
||||
monto_colones: Number(monto_colones || 0),
|
||||
comprobante: comprobante || 'N/A',
|
||||
onConfirm
|
||||
};
|
||||
|
||||
const modal = ensureSinpeRejectModalDom();
|
||||
if (!modal) return;
|
||||
|
||||
const estEl = document.getElementById('rechazoSinpeEstudiante');
|
||||
const montoEl = document.getElementById('rechazoSinpeMonto');
|
||||
const compEl = document.getElementById('rechazoSinpeComprobante');
|
||||
const realInput = document.getElementById('sinpeRejectMontoReal');
|
||||
const notasInput = document.getElementById('sinpeRejectNotasExtra');
|
||||
|
||||
if (estEl) estEl.textContent = currentSinpeRejectData.estudiante_nombre;
|
||||
if (montoEl) montoEl.textContent = `₡${currentSinpeRejectData.monto_colones.toLocaleString('es-CR')}`;
|
||||
if (compEl) compEl.textContent = currentSinpeRejectData.comprobante;
|
||||
if (realInput) realInput.value = '';
|
||||
if (notasInput) notasInput.value = '';
|
||||
|
||||
const firstRadio = document.querySelector('input[name="sinpeRejectReason"][value="fondos_no_recibidos"]');
|
||||
if (firstRadio) firstRadio.checked = true;
|
||||
|
||||
window.toggleSinpeRejectInputs();
|
||||
|
||||
modal.style.display = 'flex';
|
||||
};
|
||||
|
||||
window.cerrarModalRechazoSinpe = function(force = false) {
|
||||
if (force && force.target && force.target.classList && force.target.classList.contains('modal-qr-backdrop')) {
|
||||
return; // Ignorar clic/arrastre sobre el fondo
|
||||
}
|
||||
const note = document.getElementById('sinpeRejectNotaAdmin');
|
||||
const customTxt = document.getElementById('sinpeRejectMotivoCustom');
|
||||
const isDirty = (note && note.value.trim().length > 0) || (customTxt && customTxt.value.trim().length > 0);
|
||||
if (force !== true && isDirty) {
|
||||
if (!confirm('¿Deseas cancelar el rechazo de la recarga? Se perderá la nota escrita.')) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
const modal = document.getElementById('modalRechazarSinpe');
|
||||
if (modal) modal.style.display = 'none';
|
||||
currentSinpeRejectData = null;
|
||||
};
|
||||
|
||||
window.toggleSinpeRejectInputs = function() {
|
||||
const selected = document.querySelector('input[name="sinpeRejectReason"]:checked');
|
||||
const container = document.getElementById('sinpeRejectMontoContainer');
|
||||
if (!container || !selected) return;
|
||||
|
||||
if (selected.value === 'monto_no_coincide') {
|
||||
container.style.display = 'block';
|
||||
window.updateSinpeRejectPreview();
|
||||
const input = document.getElementById('sinpeRejectMontoReal');
|
||||
if (input) setTimeout(() => input.focus(), 50);
|
||||
} else {
|
||||
container.style.display = 'none';
|
||||
}
|
||||
};
|
||||
|
||||
window.updateSinpeRejectPreview = function() {
|
||||
const preview = document.getElementById('sinpeRejectMontoPreview');
|
||||
const inputReal = document.getElementById('sinpeRejectMontoReal');
|
||||
if (!currentSinpeRejectData || !preview || !inputReal) return;
|
||||
|
||||
const solicitado = currentSinpeRejectData.monto_colones || 0;
|
||||
const real = Number(inputReal.value || 0);
|
||||
|
||||
preview.textContent = `Se intentaron recargar ₡${solicitado.toLocaleString('es-CR')} pero el SINPE fue de ₡${real.toLocaleString('es-CR')}`;
|
||||
};
|
||||
|
||||
window.confirmarRechazoSinpeModal = async function() {
|
||||
if (!currentSinpeRejectData) return;
|
||||
|
||||
const selected = document.querySelector('input[name="sinpeRejectReason"]:checked');
|
||||
const val = selected ? selected.value : 'fondos_no_recibidos';
|
||||
const notasExtra = (document.getElementById('sinpeRejectNotasExtra')?.value || '').trim();
|
||||
const solicitado = currentSinpeRejectData.monto_colones || 0;
|
||||
|
||||
let motivoFinal = '';
|
||||
|
||||
if (val === 'fondos_no_recibidos') {
|
||||
motivoFinal = 'Fondos no recibidos en cuenta bancaria';
|
||||
if (notasExtra) motivoFinal += ` (${notasExtra})`;
|
||||
} else if (val === 'monto_no_coincide') {
|
||||
const inputReal = document.getElementById('sinpeRejectMontoReal');
|
||||
const real = Number(inputReal?.value || 0);
|
||||
if (!inputReal?.value || real <= 0) {
|
||||
showAppAlert({
|
||||
title: 'Monto requerido',
|
||||
message: 'Por favor ingresa de cuánto era el monto que figuró en el SINPE recibido.',
|
||||
type: 'warning'
|
||||
});
|
||||
inputReal?.focus();
|
||||
return;
|
||||
}
|
||||
motivoFinal = `Monto no coincide: Se intentaron recargar ₡${solicitado.toLocaleString('es-CR')} pero el SINPE recibido fue de ₡${real.toLocaleString('es-CR')}`;
|
||||
if (notasExtra) motivoFinal += ` - ${notasExtra}`;
|
||||
} else if (val === 'comprobante_invalido') {
|
||||
motivoFinal = 'Comprobante falso, duplicado o ilegible';
|
||||
if (notasExtra) motivoFinal += ` (${notasExtra})`;
|
||||
} else if (val === 'telefono_no_coincide') {
|
||||
motivoFinal = 'Teléfono o destinatario no coincide con la cuenta de la soda';
|
||||
if (notasExtra) motivoFinal += ` (${notasExtra})`;
|
||||
} else if (val === 'otro') {
|
||||
if (!notasExtra) {
|
||||
showAppAlert({
|
||||
title: 'Detalle requerido',
|
||||
message: 'Por favor escribe el motivo específico del rechazo.',
|
||||
type: 'warning'
|
||||
});
|
||||
document.getElementById('sinpeRejectNotasExtra')?.focus();
|
||||
return;
|
||||
}
|
||||
motivoFinal = notasExtra;
|
||||
}
|
||||
|
||||
const modal = document.getElementById('modalRechazarSinpe');
|
||||
if (modal) modal.style.display = 'none';
|
||||
|
||||
if (typeof currentSinpeRejectData.onConfirm === 'function') {
|
||||
const fn = currentSinpeRejectData.onConfirm;
|
||||
currentSinpeRejectData = null;
|
||||
await fn(motivoFinal);
|
||||
}
|
||||
};
|
||||
|
||||
// ========================================================
|
||||
// LÓGICA DEL MODAL DE DETALLE DE RECHAZO SINPE (PORTAL DE PADRES)
|
||||
// ========================================================
|
||||
function ensureParentMotivoRechazoModalDom() {
|
||||
let modal = document.getElementById('modalParentVerMotivoRechazo');
|
||||
if (!modal) {
|
||||
modal = document.createElement('div');
|
||||
modal.id = 'modalParentVerMotivoRechazo';
|
||||
modal.className = 'modal-qr-backdrop';
|
||||
modal.style.display = 'none';
|
||||
modal.style.zIndex = '99999';
|
||||
modal.setAttribute('onclick', 'cerrarModalParentMotivoRechazo(event)');
|
||||
modal.innerHTML = `
|
||||
<div class="modal-qr-card" onclick="event.stopPropagation()" style="max-width: 440px; text-align: left; padding: 22px; border-radius: 18px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2), 0 8px 10px -6px rgba(0,0,0,0.2);">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; border-bottom: 1.5px solid var(--border, #e2e8f0); padding-bottom: 10px; margin-bottom: 14px;">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<div style="width: 36px; height: 36px; border-radius: 10px; background: #fee2e2; color: #dc2626; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0;">
|
||||
🚫
|
||||
</div>
|
||||
<div>
|
||||
<h3 style="margin: 0; font-size: 1.05rem; font-weight: 900; color: #991b1b;">Recarga No Acreditada</h3>
|
||||
<span style="font-size: 0.72rem; color: var(--text-muted, #64748b);">Detalle del rechazo reportado por la soda</span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" onclick="cerrarModalParentMotivoRechazo()" style="background: none; border: none; font-size: 1.3rem; color: var(--text-muted, #64748b); cursor: pointer; padding: 4px;" title="Cerrar">✕</button>
|
||||
</div>
|
||||
<div style="background: rgba(148, 163, 184, 0.08); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 0.80rem; line-height: 1.45;">
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<span style="color: var(--text-muted, #64748b);">Estudiante:</span>
|
||||
<strong id="parentMotivoEstudiante" style="color: var(--text-main, #0f172a);">-</strong>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 3px;">
|
||||
<span style="color: var(--text-muted, #64748b);">Monto Solicitado:</span>
|
||||
<strong id="parentMotivoMonto" style="color: #0284c7; font-size: 0.92rem;">₡0</strong>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 3px;">
|
||||
<span style="color: var(--text-muted, #64748b);">Referencia / Cód:</span>
|
||||
<strong id="parentMotivoComprobante" style="color: var(--text-main, #334155); font-family: monospace;">-</strong>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 3px;">
|
||||
<span style="color: var(--text-muted, #64748b);">Fecha de Solicitud:</span>
|
||||
<span id="parentMotivoFecha" style="color: var(--text-muted, #64748b); font-size: 0.76rem;">-</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="background: #fff1f2; border: 1.5px solid #fecdd3; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;">
|
||||
<div style="font-size: 0.72rem; font-weight: 800; color: #be123c; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 5px;">
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>
|
||||
<span>Motivo indicado por la soda:</span>
|
||||
</div>
|
||||
<div id="parentMotivoTexto" style="font-size: 0.88rem; font-weight: 800; color: #991b1b; margin-top: 5px; line-height: 1.45;">
|
||||
Fondos no verificados en la cuenta bancaria de la soda.
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size: 0.74rem; color: #64748b; line-height: 1.42; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid #e2e8f0; margin-bottom: 16px;">
|
||||
<span style="font-size: 1rem; line-height: 1.1;">ℹ️</span>
|
||||
<span>
|
||||
Si realizaste la transferencia correctamente desde tu banco, por favor comunícate con la administración de la soda escolar y presenta el comprobante oficial para su verificación manual.
|
||||
</span>
|
||||
</div>
|
||||
<button type="button" onclick="cerrarModalParentMotivoRechazo()" class="btn-saas btn-saas-primary" style="width: 100%; height: 38px; font-weight: 800; font-size: 0.88rem; justify-content: center; cursor: pointer;">
|
||||
Entendido
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
document.body.appendChild(modal);
|
||||
}
|
||||
return modal;
|
||||
}
|
||||
|
||||
window.verMotivoRechazoSinpe = function(dataOrId) {
|
||||
let sol = null;
|
||||
if (dataOrId && typeof dataOrId === 'object') {
|
||||
sol = dataOrId;
|
||||
} else if (dataOrId !== undefined && dataOrId !== null) {
|
||||
const list = window._parentSinpeSolicitudes || [];
|
||||
sol = list.find(x => x.id === Number(dataOrId));
|
||||
}
|
||||
|
||||
if (!sol) {
|
||||
console.warn('Solicitud SINPE no encontrada para mostrar motivo');
|
||||
return;
|
||||
}
|
||||
|
||||
ensureParentMotivoRechazoModalDom();
|
||||
|
||||
const estEl = document.getElementById('parentMotivoEstudiante');
|
||||
const montoEl = document.getElementById('parentMotivoMonto');
|
||||
const compEl = document.getElementById('parentMotivoComprobante');
|
||||
const fechaEl = document.getElementById('parentMotivoFecha');
|
||||
const textoEl = document.getElementById('parentMotivoTexto');
|
||||
|
||||
const estNombre = (window.currentParentChild && window.currentParentChild.nombre_completo)
|
||||
|| sol.estudiante_nombre
|
||||
|| (window.currentStudent && window.currentStudent.nombre_completo)
|
||||
|| 'Estudiante';
|
||||
const monto = Number(sol.monto_colones || sol.monto || 0);
|
||||
const ref = sol.codigo_detalle
|
||||
? `Cód: ${sol.codigo_detalle}`
|
||||
: (sol.comprobante_sinpe ? `#${sol.comprobante_sinpe}` : 'N/A');
|
||||
|
||||
let fecha = sol.creado_en || sol.fecha || '';
|
||||
try {
|
||||
if (fecha) {
|
||||
fecha = new Date(fecha).toLocaleString('es-CR', { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' });
|
||||
}
|
||||
} catch(e) {}
|
||||
|
||||
let motivo = sol.notas || sol.descripcion || '';
|
||||
motivo = motivo.replace(/^SINPE Rechazado:\s*/i, '').replace(/\(Comprobante\s*#?[^)]*\)/i, '').trim();
|
||||
if (!motivo) {
|
||||
motivo = 'Fondos no verificados o no recibidos en la cuenta bancaria de la soda escolar.';
|
||||
}
|
||||
|
||||
if (estEl) estEl.textContent = estNombre;
|
||||
if (montoEl) montoEl.textContent = `₡${monto.toLocaleString('es-CR')}`;
|
||||
if (compEl) compEl.textContent = ref;
|
||||
if (fechaEl) fechaEl.textContent = fecha || 'Reciente';
|
||||
if (textoEl) textoEl.textContent = motivo;
|
||||
|
||||
const modal = document.getElementById('modalParentVerMotivoRechazo');
|
||||
if (modal) {
|
||||
modal.style.display = 'flex';
|
||||
if (window.sounds && typeof window.sounds.playNotice === 'function') {
|
||||
window.sounds.playNotice();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.cerrarModalParentMotivoRechazo = function(event) {
|
||||
if (event && event.target && event.target.closest && event.target.closest('.modal-qr-card') && event.target !== event.currentTarget) {
|
||||
return;
|
||||
}
|
||||
const modal = document.getElementById('modalParentVerMotivoRechazo');
|
||||
if (modal) {
|
||||
modal.style.display = 'none';
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape') {
|
||||
const parentModal = document.getElementById('modalParentVerMotivoRechazo');
|
||||
if (parentModal && parentModal.style.display !== 'none') {
|
||||
window.cerrarModalParentMotivoRechazo();
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -0,0 +1,241 @@
|
||||
/**
|
||||
* SiboPay Food & Beverage Vector Icons (SVG)
|
||||
* Iconografía vectorial fina, minimalista y elegante para productos escolares y soda
|
||||
*/
|
||||
|
||||
(function (window) {
|
||||
'use strict';
|
||||
|
||||
const FOOD_ICONS = {
|
||||
'sandwich': {
|
||||
label: 'Sandwich / Panini',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 11v3a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-3"/><path d="M12 4C7 4 4 7 4 9h16c0-2-3-5-8-5Z"/><path d="M4 18h16a1 1 0 0 0 1-1v-1H3v1a1 1 0 0 0 1 1Z"/><line x1="3" y1="13" x2="21" y2="13"/></svg>'
|
||||
},
|
||||
'croissant': {
|
||||
label: 'Empanada / Repostería',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m4.6 13.4 1.8 1.8a2 2 0 0 0 2.8 0l8.4-8.4a2 2 0 0 0 0-2.8l-1.8-1.8a2 2 0 0 0-2.8 0L4.6 10.6a2 2 0 0 0 0 2.8Z"/><path d="m14.5 9.5-6 6"/><path d="M7 17a5 5 0 0 0 7 7 5 5 0 0 0 7-7"/><path d="M3 13a5 5 0 0 0 7-7"/></svg>'
|
||||
},
|
||||
'utensils': {
|
||||
label: 'Plato Fuerte / Almuerzo',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M18 2v20"/><path d="M21 15V2v0a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7"/><path d="M6 2v20"/><path d="M3 7V2h6v5a3 3 0 0 1-6 0v0Z"/></svg>'
|
||||
},
|
||||
'cup-soda': {
|
||||
label: 'Bebida / Fresco Natural',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m6 8 1.75 12.28A2 2 0 0 0 9.73 22h4.54a2 2 0 0 0 1.98-1.72L18 8"/><path d="M5 8h14"/><path d="M7 15a6.47 6.47 0 0 1 5 0 6.47 6.47 0 0 0 5 0"/><path d="m12 8 1-6h2"/></svg>'
|
||||
},
|
||||
'milk': {
|
||||
label: 'Leche / Lácteos',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2h8"/><path d="M9 2v3a3 3 0 0 1-.88 2.12L7 8.24A4 4 0 0 0 6 11v9a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-9a4 4 0 0 0-1-2.76l-1.12-1.12A3 3 0 0 1 15 5V2"/><line x1="6" y1="15" x2="18" y2="15"/></svg>'
|
||||
},
|
||||
'coffee': {
|
||||
label: 'Café / Infusión Caliente',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 8h1a4 4 0 1 1 0 8h-1"/><path d="M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4Z"/><line x1="6" y1="2" x2="6" y2="4"/><line x1="10" y1="2" x2="10" y2="4"/><line x1="14" y1="2" x2="14" y2="4"/></svg>'
|
||||
},
|
||||
'apple': {
|
||||
label: 'Fruta / Saludable',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20.94c1.5 0 2.75 1.06 4 1.06 3 0 6-8 6-12.22A4.91 4.91 0 0 0 17 5c-2.22 0-4 1.44-5 2-1-.56-2.78-2-5-2a4.9 4.9 0 0 0-5 4.78C2 14 5 22 8 22c1.25 0 2.5-1.06 4-1.06Z"/><path d="M10 2c1 .5 2 2 2 5"/></svg>'
|
||||
},
|
||||
'bowl': {
|
||||
label: 'Bowl / Ensalada / Sopa',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 11h16a1 1 0 0 1 1 1 8 8 0 0 1-16 0 1 1 0 0 1 1-1Z"/><path d="M8 7c0-2 2-3 2-5"/><path d="M12 7c0-2 2-3 2-5"/><path d="M16 7c0-2 2-3 2-5"/></svg>'
|
||||
},
|
||||
'cookie': {
|
||||
label: 'Galleta / Snack',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5"/><circle cx="8.5" cy="8.5" r="0.75" fill="currentColor"/><circle cx="7" cy="13.5" r="0.75" fill="currentColor"/><circle cx="12" cy="16" r="0.75" fill="currentColor"/><circle cx="16.5" cy="13" r="0.75" fill="currentColor"/><circle cx="11.5" cy="11.5" r="0.75" fill="currentColor"/></svg>'
|
||||
},
|
||||
'pizza': {
|
||||
label: 'Pizza / Taco / Rápida',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m12 2-9 18a2.5 2.5 0 0 0 2.2 1.3h13.6a2.5 2.5 0 0 0 2.2-1.3L12 2Z"/><circle cx="12" cy="9.5" r="1" fill="currentColor"/><circle cx="9" cy="15.5" r="1" fill="currentColor"/><circle cx="15" cy="15.5" r="1" fill="currentColor"/></svg>'
|
||||
},
|
||||
'meat': {
|
||||
label: 'Carne / Pollo / Proteína',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m15.4 15.4-3.9 3.9a5.5 5.5 0 1 1-7.8-7.8l3.9-3.9a5.5 5.5 0 0 1 7.8 7.8Z"/><path d="m14 10 4-4"/><circle cx="19" cy="5" r="1.5"/></svg>'
|
||||
},
|
||||
'wheat': {
|
||||
label: 'Cereal / Granola / Avena',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 22 10-10"/><path d="M16 8a4 4 0 0 0-6 0 4 4 0 0 0 0 6 4 4 0 0 0 6 0 4 4 0 0 0 0-6Z"/><path d="M19 5a4 4 0 0 0-6 0 4 4 0 0 0 0 6 4 4 0 0 0 6 0 4 4 0 0 0 0-6Z"/></svg>'
|
||||
},
|
||||
'ice-cream': {
|
||||
label: 'Postre / Gelatina / Helado',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m7 11 5 11 5-11"/><path d="M12 2a5 5 0 0 0-5 5v4h10V7a5 5 0 0 0-5-5Z"/></svg>'
|
||||
},
|
||||
'store': {
|
||||
label: 'Todos / Menú Completo',
|
||||
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7"/><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"/><path d="M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4"/><path d="M2 7h20"/></svg>'
|
||||
}
|
||||
};
|
||||
|
||||
// Mapeo automático de emojis antiguos a iconos SVG elegantes
|
||||
const EMOJI_TO_KEY = {
|
||||
'🥪': 'sandwich',
|
||||
'🥟': 'croissant',
|
||||
'🌮': 'pizza',
|
||||
'🍳': 'utensils',
|
||||
'🍗': 'meat',
|
||||
'🍛': 'utensils',
|
||||
'🍹': 'cup-soda',
|
||||
'🥤': 'cup-soda',
|
||||
'🧃': 'cup-soda',
|
||||
'🥛': 'milk',
|
||||
'🍉': 'apple',
|
||||
'🥣': 'bowl',
|
||||
'🌾': 'wheat',
|
||||
'🍮': 'ice-cream',
|
||||
'🍎': 'apple',
|
||||
'🍕': 'pizza',
|
||||
'🥗': 'bowl',
|
||||
'🍪': 'cookie',
|
||||
'🍽️': 'utensils',
|
||||
'☕': 'coffee',
|
||||
'🥩': 'meat',
|
||||
'🍦': 'ice-cream',
|
||||
'🥑': 'apple',
|
||||
'🥐': 'croissant',
|
||||
'🍞': 'sandwich',
|
||||
'🍔': 'sandwich'
|
||||
};
|
||||
|
||||
/**
|
||||
* Resuelve el identificador de icono SVG a partir de una clave, emoji o nombre de producto
|
||||
*/
|
||||
function resolveIconKey(rawInput, fallbackName) {
|
||||
if (!rawInput && !fallbackName) return 'sandwich';
|
||||
const input = String(rawInput || '').trim();
|
||||
|
||||
// 1. Si coincide directamente con una clave conocida
|
||||
if (FOOD_ICONS[input]) return input;
|
||||
|
||||
// 2. Si coincide con un emoji mapeado
|
||||
if (EMOJI_TO_KEY[input]) return EMOJI_TO_KEY[input];
|
||||
|
||||
// 3. Analizar palabras clave en el nombre del producto
|
||||
const text = (String(fallbackName || '') + ' ' + input).toLowerCase();
|
||||
if (text.includes('empanada') || text.includes('pastel') || text.includes('reposter') || text.includes('croissant')) return 'croissant';
|
||||
if (text.includes('sandwich') || text.includes('emparedado') || text.includes('pan') || text.includes('tostada')) return 'sandwich';
|
||||
if (text.includes('fresco') || text.includes('jugo') || text.includes('te frio') || text.includes('té') || text.includes('gaseosa') || text.includes('bebida') || text.includes('refresco')) return 'cup-soda';
|
||||
if (text.includes('leche') || text.includes('batido')) return 'milk';
|
||||
if (text.includes('cafe') || text.includes('café') || text.includes('chocolate caliente')) return 'coffee';
|
||||
if (text.includes('fruta') || text.includes('manzana') || text.includes('sandia') || text.includes('sandía') || text.includes('pina') || text.includes('piña')) return 'apple';
|
||||
if (text.includes('ensalada') || text.includes('sopa') || text.includes('bowl') || text.includes('yogurt')) return 'bowl';
|
||||
if (text.includes('pinto') || text.includes('casado') || text.includes('almuerzo') || text.includes('arroz') || text.includes('plato')) return 'utensils';
|
||||
if (text.includes('pollo') || text.includes('carne') || text.includes('bistec') || text.includes('chuleta')) return 'meat';
|
||||
if (text.includes('pizza') || text.includes('taco') || text.includes('wrap')) return 'pizza';
|
||||
if (text.includes('galleta') || text.includes('snack') || text.includes('barra') || text.includes('cereal') || text.includes('avena')) return 'cookie';
|
||||
if (text.includes('gelatina') || text.includes('helado') || text.includes('postre') || text.includes('flan')) return 'ice-cream';
|
||||
|
||||
return 'sandwich';
|
||||
}
|
||||
|
||||
/**
|
||||
* Retorna el SVG puro del icono
|
||||
*/
|
||||
function getFoodSvg(rawInput, fallbackName, size = 22) {
|
||||
const key = resolveIconKey(rawInput, fallbackName);
|
||||
const item = FOOD_ICONS[key] || FOOD_ICONS['sandwich'];
|
||||
return item.svg.replace('<svg ', `<svg width="${size}" height="${size}" `);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retorna una insignia circular elegante y limpia con el SVG dentro
|
||||
* variant: 'card' (catálogo POS/PWA 50x50), 'badge' (34x34 para carrito/filas), 'inline' (15x15 para texto)
|
||||
*/
|
||||
function getFoodIconBadge(rawInput, fallbackName, variant = 'card') {
|
||||
const key = resolveIconKey(rawInput, fallbackName);
|
||||
|
||||
if (variant === 'card') {
|
||||
const svg = getFoodSvg(key, null, 24);
|
||||
return `
|
||||
<div class="sibopay-food-badge-card" style="width: 50px; height: 50px; border-radius: 50%; background: #f0f9ff; border: 1.5px solid #bae6fd; color: #0284c7; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08); flex-shrink: 0; transition: all 0.2s ease;">
|
||||
${svg}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
if (variant === 'badge') {
|
||||
const svg = getFoodSvg(key, null, 17);
|
||||
return `
|
||||
<div class="sibopay-food-badge-sm" style="width: 34px; height: 34px; border-radius: 9px; background: #f0f9ff; border: 1.2px solid #bae6fd; color: #0284c7; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-right: 8px;">
|
||||
${svg}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
if (variant === 'inline') {
|
||||
const svg = getFoodSvg(key, null, 15);
|
||||
return `<span style="display: inline-flex; align-items: center; justify-content: center; vertical-align: -2px; color: #0284c7; margin-right: 5px;">${svg}</span>`;
|
||||
}
|
||||
|
||||
return getFoodSvg(key, fallbackName, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renderiza el selector de iconos finos para los modales de creación/edición de productos
|
||||
*/
|
||||
function renderIconPicker(containerId, inputId, previewId, currentKey) {
|
||||
const container = document.getElementById(containerId);
|
||||
const input = document.getElementById(inputId);
|
||||
const preview = document.getElementById(previewId);
|
||||
if (!container) return;
|
||||
|
||||
const resolved = resolveIconKey(currentKey || (input ? input.value : 'sandwich'));
|
||||
if (input) input.value = resolved;
|
||||
if (preview) preview.innerHTML = getFoodIconBadge(resolved, null, 'card');
|
||||
|
||||
const pickerKeys = [
|
||||
'sandwich', 'croissant', 'utensils', 'cup-soda',
|
||||
'milk', 'coffee', 'apple', 'bowl',
|
||||
'cookie', 'pizza', 'meat', 'ice-cream'
|
||||
];
|
||||
|
||||
container.innerHTML = pickerKeys.map(k => {
|
||||
const isAct = (k === resolved);
|
||||
const svg = getFoodSvg(k, null, 18);
|
||||
const label = FOOD_ICONS[k]?.label || k;
|
||||
return `
|
||||
<button type="button"
|
||||
class="btn-food-icon-picker ${isAct ? 'active' : ''}"
|
||||
id="btnFoodPick_${k}"
|
||||
onclick="window.SiboPayIcons.onPickIcon('${k}', '${containerId}', '${inputId}', '${previewId}')"
|
||||
title="${label}"
|
||||
style="width: 38px; height: 38px; border-radius: 8px; border: 1.5px solid ${isAct ? '#0284c7' : 'var(--border)'}; background: ${isAct ? '#f0f9ff' : 'var(--card-bg)'}; color: ${isAct ? '#0284c7' : 'var(--text-muted)'}; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s ease;">
|
||||
${svg}
|
||||
</button>
|
||||
`;
|
||||
}).join('');
|
||||
}
|
||||
|
||||
function onPickIcon(key, containerId, inputId, previewId) {
|
||||
const input = document.getElementById(inputId);
|
||||
const preview = document.getElementById(previewId);
|
||||
if (input) input.value = key;
|
||||
if (preview) preview.innerHTML = getFoodIconBadge(key, null, 'card');
|
||||
|
||||
const container = document.getElementById(containerId);
|
||||
if (container) {
|
||||
container.querySelectorAll('.btn-food-icon-picker').forEach(b => {
|
||||
b.classList.remove('active');
|
||||
b.style.borderColor = 'var(--border)';
|
||||
b.style.background = 'var(--card-bg)';
|
||||
b.style.color = 'var(--text-muted)';
|
||||
});
|
||||
const activeBtn = document.getElementById(`btnFoodPick_${key}`);
|
||||
if (activeBtn) {
|
||||
activeBtn.classList.add('active');
|
||||
activeBtn.style.borderColor = '#0284c7';
|
||||
activeBtn.style.background = '#f0f9ff';
|
||||
activeBtn.style.color = '#0284c7';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Exportar al ámbito global
|
||||
window.SiboPayIcons = {
|
||||
FOOD_ICONS,
|
||||
resolveIconKey,
|
||||
getFoodSvg,
|
||||
getFoodIconBadge,
|
||||
renderIconPicker,
|
||||
onPickIcon
|
||||
};
|
||||
|
||||
})(window);
|
||||
@@ -1,152 +1,270 @@
|
||||
// Sintetizador Web Audio API para feedback sonoro en tiempo real sin dependencias externas
|
||||
class SoundEffects {
|
||||
// ========================================================
|
||||
// SISTEMA SENSORIAL SIBOPAY: AUDIO SINTETIZADO Y HÁPTICO MÓVIL
|
||||
// Sonidos sintetizados mediante Web Audio API (cero descargas, cero latencia)
|
||||
// y vibración háptica táctil en dispositivos móviles (navigator.vibrate)
|
||||
// ========================================================
|
||||
|
||||
class SensorySystem {
|
||||
constructor() {
|
||||
this.ctx = null;
|
||||
this.soundEnabled = localStorage.getItem('sibopay_sound_enabled') !== 'false';
|
||||
this.hapticEnabled = localStorage.getItem('sibopay_haptic_enabled') !== 'false';
|
||||
this.masterVolume = 0.22; // Nivel suave y agradable, no intrusivo
|
||||
this._initOnGesture = this._initOnGesture.bind(this);
|
||||
|
||||
// Escuchar interacción del usuario para desbloquear AudioContext en móviles (política de navegadores)
|
||||
if (typeof window !== 'undefined') {
|
||||
window.addEventListener('pointerdown', this._initOnGesture, { once: true, passive: true });
|
||||
window.addEventListener('keydown', this._initOnGesture, { once: true, passive: true });
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
if (!this.ctx) {
|
||||
_initOnGesture() {
|
||||
this._getAudioContext();
|
||||
}
|
||||
|
||||
_getAudioContext() {
|
||||
if (!this.ctx && (typeof window !== 'undefined')) {
|
||||
const AudioCtx = window.AudioContext || window.webkitAudioContext;
|
||||
this.ctx = new AudioCtx();
|
||||
if (AudioCtx) {
|
||||
try {
|
||||
this.ctx = new AudioCtx();
|
||||
} catch (e) {
|
||||
console.warn('[SensorySystem] No se pudo inicializar AudioContext:', e);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.ctx.state === 'suspended') {
|
||||
this.ctx.resume();
|
||||
if (this.ctx && this.ctx.state === 'suspended') {
|
||||
this.ctx.resume().catch(() => {});
|
||||
}
|
||||
return this.ctx;
|
||||
}
|
||||
|
||||
// Sonido de escaneo exitoso / cobro completado (Tono alegre ascendente)
|
||||
// ==========================================
|
||||
// RETROALIMENTACIÓN HÁPTICA (VIBRACIÓN TÁCTIL)
|
||||
// ==========================================
|
||||
vibrate(pattern) {
|
||||
if (!this.hapticEnabled) return;
|
||||
try {
|
||||
if (typeof navigator !== 'undefined' && 'vibrate' in navigator) {
|
||||
navigator.vibrate(pattern);
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
hapticTap() {
|
||||
this.vibrate([28]); // 28ms pulso perceptible para motores hápticos móviles
|
||||
}
|
||||
|
||||
hapticSuccess() {
|
||||
this.vibrate([35, 45, 55]); // Doble pulso nítido de confirmación
|
||||
}
|
||||
|
||||
hapticScan() {
|
||||
this.vibrate([35]); // Pulso nítido de detección
|
||||
}
|
||||
|
||||
hapticWarning() {
|
||||
this.vibrate([45, 50, 45]);
|
||||
}
|
||||
|
||||
hapticError() {
|
||||
this.vibrate([70, 50, 70]); // Pulso más marcado de advertencia/error
|
||||
}
|
||||
|
||||
// ==========================================
|
||||
// SÍNTESIS DE AUDIO (WEB AUDIO API)
|
||||
// ==========================================
|
||||
|
||||
// Campana suave de éxito (arpegio de 3 notas: Do - Mi - Sol)
|
||||
playSuccess() {
|
||||
this.hapticSuccess();
|
||||
if (!this.soundEnabled) return;
|
||||
const ctx = this._getAudioContext();
|
||||
if (!ctx) return;
|
||||
|
||||
try {
|
||||
this.init();
|
||||
const now = this.ctx.currentTime;
|
||||
const osc1 = this.ctx.createOscillator();
|
||||
const osc2 = this.ctx.createOscillator();
|
||||
const gain = this.ctx.createGain();
|
||||
const now = ctx.currentTime;
|
||||
const notes = [523.25, 659.25, 783.99]; // C5, E5, G5
|
||||
notes.forEach((freq, index) => {
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
osc.type = 'sine';
|
||||
osc.frequency.setValueAtTime(freq, now + index * 0.08);
|
||||
|
||||
osc1.type = 'triangle';
|
||||
osc2.type = 'sine';
|
||||
gain.gain.setValueAtTime(0, now + index * 0.08);
|
||||
gain.gain.linearRampToValueAtTime(this.masterVolume, now + index * 0.08 + 0.02);
|
||||
gain.gain.exponentialRampToValueAtTime(0.0001, now + index * 0.08 + 0.35);
|
||||
|
||||
// Acorde alegre de confirmación: C5 -> E5 -> G5
|
||||
osc1.frequency.setValueAtTime(523.25, now);
|
||||
osc1.frequency.exponentialRampToValueAtTime(659.25, now + 0.1);
|
||||
osc1.frequency.exponentialRampToValueAtTime(783.99, now + 0.2);
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
|
||||
osc2.frequency.setValueAtTime(261.63, now);
|
||||
osc2.frequency.setValueAtTime(329.63, now + 0.1);
|
||||
osc2.frequency.setValueAtTime(392.00, now + 0.2);
|
||||
|
||||
gain.gain.setValueAtTime(0.2, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.01, now + 0.35);
|
||||
|
||||
osc1.connect(gain);
|
||||
osc2.connect(gain);
|
||||
gain.connect(this.ctx.destination);
|
||||
|
||||
osc1.start(now);
|
||||
osc2.start(now);
|
||||
osc1.stop(now + 0.35);
|
||||
osc2.stop(now + 0.35);
|
||||
} catch (e) {
|
||||
console.warn('Audio no disponible:', e);
|
||||
}
|
||||
osc.start(now + index * 0.08);
|
||||
osc.stop(now + index * 0.08 + 0.36);
|
||||
});
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
// Sonido de moneda para Modo Kids
|
||||
// Sonido de moneda / pago registrado (doble tintineo metálico)
|
||||
playCoin() {
|
||||
this.hapticSuccess();
|
||||
if (!this.soundEnabled) return;
|
||||
const ctx = this._getAudioContext();
|
||||
if (!ctx) return;
|
||||
|
||||
try {
|
||||
this.init();
|
||||
const now = this.ctx.currentTime;
|
||||
const osc = this.ctx.createOscillator();
|
||||
const gain = this.ctx.createGain();
|
||||
const now = ctx.currentTime;
|
||||
const tones = [987.77, 1318.51]; // B5 -> E6
|
||||
tones.forEach((freq, index) => {
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
osc.type = 'triangle';
|
||||
osc.frequency.setValueAtTime(freq, now + index * 0.09);
|
||||
|
||||
osc.type = 'sine';
|
||||
osc.frequency.setValueAtTime(987.77, now); // B5
|
||||
osc.frequency.setValueAtTime(1318.51, now + 0.08); // E6
|
||||
gain.gain.setValueAtTime(0, now + index * 0.09);
|
||||
gain.gain.linearRampToValueAtTime(this.masterVolume * 0.9, now + index * 0.09 + 0.015);
|
||||
gain.gain.exponentialRampToValueAtTime(0.0001, now + index * 0.09 + 0.28);
|
||||
|
||||
gain.gain.setValueAtTime(0.25, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.01, now + 0.3);
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
|
||||
osc.connect(gain);
|
||||
gain.connect(this.ctx.destination);
|
||||
|
||||
osc.start(now);
|
||||
osc.stop(now + 0.3);
|
||||
osc.start(now + index * 0.09);
|
||||
osc.stop(now + index * 0.09 + 0.30);
|
||||
});
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
// Chirp de escáner láser de código de barras
|
||||
// Chirp nítido de escáner QR o código de barras
|
||||
playScanChirp() {
|
||||
this.hapticScan();
|
||||
if (!this.soundEnabled) return;
|
||||
const ctx = this._getAudioContext();
|
||||
if (!ctx) return;
|
||||
|
||||
try {
|
||||
this.init();
|
||||
const now = this.ctx.currentTime;
|
||||
const osc = this.ctx.createOscillator();
|
||||
const gain = this.ctx.createGain();
|
||||
|
||||
osc.type = 'square';
|
||||
osc.frequency.setValueAtTime(2000, now);
|
||||
osc.frequency.exponentialRampToValueAtTime(1200, now + 0.06);
|
||||
|
||||
gain.gain.setValueAtTime(0.15, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.01, now + 0.07);
|
||||
|
||||
osc.connect(gain);
|
||||
gain.connect(this.ctx.destination);
|
||||
|
||||
osc.start(now);
|
||||
osc.stop(now + 0.07);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
// Sonido de error / límite superado (Tono grave de advertencia)
|
||||
playError() {
|
||||
try {
|
||||
this.init();
|
||||
const now = this.ctx.currentTime;
|
||||
const osc = this.ctx.createOscillator();
|
||||
const gain = this.ctx.createGain();
|
||||
|
||||
osc.type = 'sawtooth';
|
||||
osc.frequency.setValueAtTime(220, now);
|
||||
osc.frequency.setValueAtTime(180, now + 0.15);
|
||||
|
||||
gain.gain.setValueAtTime(0.2, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.01, now + 0.35);
|
||||
|
||||
osc.connect(gain);
|
||||
gain.connect(this.ctx.destination);
|
||||
|
||||
osc.start(now);
|
||||
osc.stop(now + 0.35);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
// Sonido de clic / tap sutil
|
||||
playTap() {
|
||||
try {
|
||||
this.init();
|
||||
const now = this.ctx.currentTime;
|
||||
const osc = this.ctx.createOscillator();
|
||||
const gain = this.ctx.createGain();
|
||||
const now = ctx.currentTime;
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
|
||||
osc.type = 'sine';
|
||||
osc.frequency.setValueAtTime(600, now);
|
||||
osc.frequency.exponentialRampToValueAtTime(300, now + 0.04);
|
||||
osc.frequency.setValueAtTime(1400, now);
|
||||
osc.frequency.exponentialRampToValueAtTime(1900, now + 0.04);
|
||||
|
||||
gain.gain.setValueAtTime(0.08, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.001, now + 0.04);
|
||||
gain.gain.setValueAtTime(this.masterVolume * 0.8, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.0001, now + 0.05);
|
||||
|
||||
osc.connect(gain);
|
||||
gain.connect(this.ctx.destination);
|
||||
gain.connect(ctx.destination);
|
||||
|
||||
osc.start(now);
|
||||
osc.stop(now + 0.04);
|
||||
osc.stop(now + 0.05);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
// Tap acústico sutil para botones numéricos o selección
|
||||
playTap() {
|
||||
this.hapticTap();
|
||||
if (!this.soundEnabled) return;
|
||||
const ctx = this._getAudioContext();
|
||||
if (!ctx) return;
|
||||
|
||||
try {
|
||||
const now = ctx.currentTime;
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
|
||||
osc.type = 'sine';
|
||||
osc.frequency.setValueAtTime(440, now);
|
||||
osc.frequency.exponentialRampToValueAtTime(220, now + 0.025);
|
||||
|
||||
gain.gain.setValueAtTime(this.masterVolume * 0.4, now);
|
||||
gain.gain.exponentialRampToValueAtTime(0.0001, now + 0.03);
|
||||
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
|
||||
osc.start(now);
|
||||
osc.stop(now + 0.03);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
// Tono de error o rechazo (dos tonos bajos descendentes)
|
||||
playError() {
|
||||
this.hapticError();
|
||||
if (!this.soundEnabled) return;
|
||||
const ctx = this._getAudioContext();
|
||||
if (!ctx) return;
|
||||
|
||||
try {
|
||||
const now = ctx.currentTime;
|
||||
const tones = [260, 195];
|
||||
tones.forEach((freq, idx) => {
|
||||
const osc = ctx.createOscillator();
|
||||
const gain = ctx.createGain();
|
||||
|
||||
osc.type = 'sawtooth';
|
||||
osc.frequency.setValueAtTime(freq, now + idx * 0.12);
|
||||
|
||||
gain.gain.setValueAtTime(this.masterVolume * 0.6, now + idx * 0.12);
|
||||
gain.gain.exponentialRampToValueAtTime(0.0001, now + idx * 0.12 + 0.14);
|
||||
|
||||
osc.connect(gain);
|
||||
gain.connect(ctx.destination);
|
||||
|
||||
osc.start(now + idx * 0.12);
|
||||
osc.stop(now + idx * 0.12 + 0.15);
|
||||
});
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
// Sonido de escaneo / beep
|
||||
playBeep() {
|
||||
this.playScanChirp();
|
||||
this.playTap();
|
||||
}
|
||||
|
||||
playNotice() {
|
||||
this.playSuccess();
|
||||
}
|
||||
|
||||
playTrash() {
|
||||
this.playTap();
|
||||
}
|
||||
|
||||
// ==========================================
|
||||
// CONFIGURACIÓN DE PREFERENCIAS DE USUARIO
|
||||
// ==========================================
|
||||
toggleSound(enabled) {
|
||||
this.soundEnabled = (typeof enabled === 'boolean') ? enabled : !this.soundEnabled;
|
||||
localStorage.setItem('sibopay_sound_enabled', String(this.soundEnabled));
|
||||
if (this.soundEnabled) this.playTap();
|
||||
return this.soundEnabled;
|
||||
}
|
||||
|
||||
toggleHaptics(enabled) {
|
||||
this.hapticEnabled = (typeof enabled === 'boolean') ? enabled : !this.hapticEnabled;
|
||||
localStorage.setItem('sibopay_haptic_enabled', String(this.hapticEnabled));
|
||||
if (this.hapticEnabled) this.hapticTap();
|
||||
return this.hapticEnabled;
|
||||
}
|
||||
|
||||
isSoundEnabled() {
|
||||
return this.soundEnabled;
|
||||
}
|
||||
|
||||
isHapticEnabled() {
|
||||
return this.hapticEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
window.sounds = new SoundEffects();
|
||||
// Instancia global compartida
|
||||
const sensoryInstance = new SensorySystem();
|
||||
|
||||
// Exponer como window.sounds y window.haptics para máxima compatibilidad
|
||||
window.sounds = sensoryInstance;
|
||||
window.haptics = {
|
||||
tap: () => sensoryInstance.hapticTap(),
|
||||
success: () => sensoryInstance.hapticSuccess(),
|
||||
scan: () => sensoryInstance.hapticScan(),
|
||||
warning: () => sensoryInstance.hapticWarning(),
|
||||
error: () => sensoryInstance.hapticError(),
|
||||
vibrate: (p) => sensoryInstance.vibrate(p)
|
||||
};
|
||||
|
||||
@@ -68,20 +68,24 @@
|
||||
|
||||
<!-- NAVEGACIÓN SUPERIOR MINIMALISTA -->
|
||||
<header class="max-w-4xl mx-auto mb-6 flex items-center justify-between no-print">
|
||||
<a href="/landing" class="flex items-center gap-3 group">
|
||||
<a href="/app" id="linkLogoLegal" onclick="manejarRetornoApp(event)" class="flex items-center gap-3 group">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" class="w-10 h-10 object-contain drop-shadow-sm group-hover:scale-105 transition-transform">
|
||||
<span class="text-2xl font-black tracking-tight text-slate-900">Sibo<span class="text-sky-600">Pay</span></span>
|
||||
</a>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="flex items-center gap-2 sm:gap-3">
|
||||
<button onclick="window.print()" class="hidden sm:inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-bold text-slate-600 bg-white border border-slate-200 hover:bg-slate-50 transition">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 6 2 18 2 18 9"/><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"/><rect x="6" y="14" width="12" height="8"/></svg>
|
||||
<span>Imprimir</span>
|
||||
</button>
|
||||
|
||||
<a href="/landing" class="inline-flex items-center gap-1.5 px-4 py-2 rounded-lg text-xs font-bold text-slate-700 bg-white border border-slate-200 hover:text-slate-900 transition">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m15 18-6-6 6-6"/></svg>
|
||||
<span>Volver al inicio</span>
|
||||
<a id="btnNavReturn" href="/app" onclick="manejarRetornoApp(event)" class="inline-flex items-center gap-1.5 px-4 py-2 rounded-xl text-xs font-black text-slate-800 bg-white border border-slate-200 hover:bg-slate-50 transition shadow-sm">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m15 18-6-6 6-6"/></svg>
|
||||
<span id="txtNavReturn">Volver a la App</span>
|
||||
</a>
|
||||
|
||||
<a id="btnNavLanding" href="/" class="hidden inline-flex items-center gap-1 px-3 py-2 rounded-xl text-xs font-semibold text-slate-500 hover:text-slate-800 transition">
|
||||
<span>Inicio</span>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
@@ -185,6 +189,7 @@
|
||||
</p>
|
||||
<div class="border border-slate-200 bg-slate-50/50 rounded-xl p-4 space-y-2 text-xs sm:text-sm text-slate-700">
|
||||
<p><strong>• Naturaleza del Saldo:</strong> El saldo acreditado representa un crédito escolar prepagado, utilizable exclusivamente para el consumo de productos y servicios autorizados en las sodas escolares afiliadas.</p>
|
||||
<p><strong>• Prohibición de Conversión y Retiro a Efectivo (No Cashback):</strong> Los fondos y saldos acreditados en la plataforma constituyen créditos escolares de consumo prepagado, utilizables única y exclusivamente para compras y consumo dentro de las sodas escolares afiliadas. Bajo ninguna circunstancia podrán ser canjeados, devueltos en dinero en efectivo, transferidos a cuentas bancarias externas ni liquidados en moneda de curso legal fuera del ecosistema escolar.</p>
|
||||
<p><strong>• Procedimiento de Recarga:</strong> Las recargas se realizan mediante transferencias bancarias o SINPE Móvil. Los fondos quedan disponibles una vez confirmada y verificada la transferencia por los mecanismos de control del sistema.</p>
|
||||
<p><strong>• Reversiones de Cobro:</strong> En caso de errores materiales o cargos involuntarios ocurridos en el mostrador, el personal autorizado de la soda puede procesar la reversión inmediata de la transacción para reintegrar el saldo al alumno en tiempo real.</p>
|
||||
</div>
|
||||
@@ -340,7 +345,7 @@
|
||||
En conformidad con la Ley N° 8968, los titulares pueden ejercer en todo momento sus derechos de <strong>Acceso, Rectificación, Cancelación y Oposición (ARCO)</strong>.
|
||||
</p>
|
||||
<p>
|
||||
Para actualizar información errónea o solicitar la eliminación total de la cuenta y los registros históricos de un alumno al concluir el ciclo escolar, el tutor legal puede remitir la solicitud a <strong>[email protected]</strong>. Las solicitudes de eliminación se procesan en un plazo no mayor a cinco (5) días hábiles.
|
||||
Para actualizar información errónea o solicitar la eliminación total de la cuenta y los registros históricos de un alumno al concluir el ciclo escolar, el tutor legal puede remitir la solicitud a <strong>[email protected]</strong> o utilizar nuestro canal directo automatizado de <strong><a href="/eliminar-cuenta" class="text-sky-600 font-bold underline hover:text-sky-800">Solicitud Web de Eliminación de Cuenta y Datos</a></strong> (o desde los Ajustes de la App Móvil). Las solicitudes de eliminación se procesan de forma inmediata o en un plazo no mayor a cinco (5) días hábiles.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@@ -356,15 +361,23 @@
|
||||
</article>
|
||||
|
||||
<!-- PIE DEL DOCUMENTO / HOJA FORMAL -->
|
||||
<div class="mt-12 pt-6 border-t border-slate-200 text-center text-xs text-slate-500 space-y-2">
|
||||
<div class="flex items-center justify-center gap-3 font-medium text-slate-600">
|
||||
<div class="mt-12 pt-6 border-t border-slate-200 text-center text-xs text-slate-500 space-y-3">
|
||||
<div class="flex justify-center pb-2">
|
||||
<a href="/app" onclick="manejarRetornoApp(event)" class="inline-flex items-center gap-2 px-5 py-2.5 rounded-xl text-xs font-black text-white bg-sky-600 hover:bg-sky-700 transition shadow-sm cursor-pointer">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m15 18-6-6 6-6"/></svg>
|
||||
<span class="txtRetornoApp">Regresar a la Aplicación SiboPay</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex items-center justify-center gap-3 font-medium text-slate-600 flex-wrap">
|
||||
<span>SiboPay Costa Rica</span>
|
||||
<span>•</span>
|
||||
<span>Cumplimiento Ley N° 8968</span>
|
||||
<span>•</span>
|
||||
<span>Google Play Data Safety</span>
|
||||
<span>•</span>
|
||||
<a href="/eliminar-cuenta" class="text-rose-600 font-bold hover:underline">Eliminación de Cuenta</a>
|
||||
</div>
|
||||
<p>© 2026 SiboPay. Plataforma de pagos y monedero escolar digital. Todos los derechos reservados.</p>
|
||||
<p>© 2026 SiboPay. Sistema inteligente de billetera online. Todos los derechos reservados.</p>
|
||||
<p class="text-slate-400">Canal de atención y soporte: <a href="mailto:[email protected]" class="text-slate-600 font-semibold hover:underline">[email protected]</a></p>
|
||||
</div>
|
||||
|
||||
@@ -372,6 +385,42 @@
|
||||
|
||||
<!-- LÓGICA DE INTERCAMBIO ENTRE PESTAÑAS Y URL HASH -->
|
||||
<script>
|
||||
function detectarOrigen() {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const isFromApp = params.get('from') === 'app' || document.referrer.includes('/app') || document.referrer.includes('sibopay.com/app');
|
||||
const btnReturn = document.getElementById('btnNavReturn');
|
||||
const txtReturn = document.getElementById('txtNavReturn');
|
||||
const btnLanding = document.getElementById('btnNavLanding');
|
||||
const txtsAll = document.querySelectorAll('.txtRetornoApp');
|
||||
|
||||
if (isFromApp) {
|
||||
if (txtReturn) txtReturn.textContent = 'Volver a la App';
|
||||
if (btnReturn) btnReturn.href = '/app';
|
||||
if (btnLanding) btnLanding.classList.add('hidden');
|
||||
txtsAll.forEach(el => el.textContent = 'Regresar a la Aplicación SiboPay');
|
||||
} else {
|
||||
if (txtReturn) txtReturn.textContent = 'Ingresar a la App';
|
||||
if (btnReturn) btnReturn.href = '/app';
|
||||
if (btnLanding) btnLanding.classList.remove('hidden');
|
||||
txtsAll.forEach(el => el.textContent = 'Ir a la Aplicación SiboPay');
|
||||
}
|
||||
}
|
||||
|
||||
function manejarRetornoApp(e) {
|
||||
if (e) e.preventDefault();
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const isFromApp = params.get('from') === 'app' || document.referrer.includes('/app') || document.referrer.includes('sibopay.com/app');
|
||||
|
||||
if (isFromApp && window.history.length > 1) {
|
||||
window.history.back();
|
||||
setTimeout(() => {
|
||||
window.location.href = '/app';
|
||||
}, 250);
|
||||
} else {
|
||||
window.location.href = '/app';
|
||||
}
|
||||
}
|
||||
|
||||
function switchLegalDoc(docType) {
|
||||
const btnTerminos = document.getElementById('tabBtnTerminos');
|
||||
const btnPrivacidad = document.getElementById('tabBtnPrivacidad');
|
||||
@@ -397,8 +446,9 @@
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||
}
|
||||
|
||||
// Inicializar según ruta o hash
|
||||
// Inicializar según ruta o hash y detectar origen
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
detectarOrigen();
|
||||
const path = window.location.pathname.toLowerCase();
|
||||
const hash = window.location.hash.toLowerCase();
|
||||
|
||||
|
||||
@@ -1,24 +1,66 @@
|
||||
{
|
||||
"name": "SiboPay - Plataforma de Pagos y Monedero Escolar",
|
||||
"name": "SiboPay - Sistema Inteligente de Billetera Online",
|
||||
"short_name": "SiboPay",
|
||||
"start_url": "/index.html",
|
||||
"scope": "/",
|
||||
"id": "sibopay-pwa",
|
||||
"id": "https://sibopay.com/",
|
||||
"display": "standalone",
|
||||
"display_override": ["standalone", "window-controls-overlay"],
|
||||
"orientation": "portrait",
|
||||
"prefer_related_applications": false,
|
||||
"background_color": "#052036",
|
||||
"theme_color": "#0284c7",
|
||||
"description": "Plataforma Digital de Pagos Rápidos, Transferencias y Monedero Escolar en Costa Rica",
|
||||
"lang": "es",
|
||||
"categories": ["finance", "shopping", "business"],
|
||||
"description": "Sistema inteligente de billetera online",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/icons/icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
],
|
||||
"screenshots": [
|
||||
{
|
||||
"src": "/screenshots/screen1.png",
|
||||
"sizes": "1080x2400",
|
||||
"type": "image/png",
|
||||
"form_factor": "narrow",
|
||||
"label": "Acceso Seguro a SiboPay"
|
||||
},
|
||||
{
|
||||
"src": "/screenshots/screen2.png",
|
||||
"sizes": "1080x2400",
|
||||
"type": "image/png",
|
||||
"form_factor": "narrow",
|
||||
"label": "Billetera Digital y Carné QR"
|
||||
},
|
||||
{
|
||||
"src": "/screenshots/screen3.png",
|
||||
"sizes": "1080x2400",
|
||||
"type": "image/png",
|
||||
"form_factor": "narrow",
|
||||
"label": "Catálogo Digital y Pedidos"
|
||||
},
|
||||
{
|
||||
"src": "/screenshots/screen-wide.png",
|
||||
"sizes": "1920x1080",
|
||||
"type": "image/png",
|
||||
"form_factor": "wide",
|
||||
"label": "Plataforma Web y Monedero Digital SiboPay"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,699 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<title>SiboPay - Pistola Lectora QR Remota</title>
|
||||
<link rel="icon" type="image/png" href="/img/sibopay-emblem.png">
|
||||
<meta name="theme-color" content="#0f172a">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #0f172a;
|
||||
color: #f8fafc;
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
/* Top Bar */
|
||||
.pistola-header {
|
||||
background: #1e293b;
|
||||
border-bottom: 1.5px solid #334155;
|
||||
padding: 12px 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.brand-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.brand-box img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.brand-box h1 {
|
||||
font-size: 1rem;
|
||||
font-weight: 900;
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
|
||||
.brand-box h1 span {
|
||||
color: #38bdf8;
|
||||
}
|
||||
|
||||
.brand-box p {
|
||||
font-size: 0.68rem;
|
||||
color: #94a3b8;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 10px;
|
||||
border-radius: 20px;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 800;
|
||||
background: rgba(16, 185, 129, 0.15);
|
||||
color: #34d399;
|
||||
border: 1px solid rgba(16, 185, 129, 0.4);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.status-badge.connecting {
|
||||
background: rgba(245, 158, 11, 0.15);
|
||||
color: #fbbf24;
|
||||
border-color: rgba(245, 158, 11, 0.4);
|
||||
}
|
||||
|
||||
.status-badge.offline {
|
||||
background: rgba(239, 68, 68, 0.15);
|
||||
color: #f87171;
|
||||
border-color: rgba(239, 68, 68, 0.4);
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: currentColor;
|
||||
}
|
||||
|
||||
/* Banner de cobro sincronizado desde la PC */
|
||||
.pos-sync-banner {
|
||||
background: #0284c7;
|
||||
color: #ffffff;
|
||||
padding: 10px 14px;
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 800;
|
||||
animation: bannerPulse 1.8s ease-in-out infinite;
|
||||
z-index: 15;
|
||||
}
|
||||
|
||||
@keyframes bannerPulse {
|
||||
0%, 100% { background: #0284c7; }
|
||||
50% { background: #0369a1; }
|
||||
}
|
||||
|
||||
.pos-sync-banner.active {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Visor de Cámara Principal */
|
||||
.scanner-viewport {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
background: #000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#scannerVideo {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
/* Retícula de mira láser */
|
||||
.aiming-reticle {
|
||||
position: absolute;
|
||||
width: 260px;
|
||||
height: 260px;
|
||||
pointer-events: none;
|
||||
box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.55);
|
||||
border-radius: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Esquinas estilizadas */
|
||||
.corner {
|
||||
position: absolute;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-color: #38bdf8;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.corner.tl { top: 0; left: 0; border-width: 4px 0 0 4px; border-top-left-radius: 20px; }
|
||||
.corner.tr { top: 0; right: 0; border-width: 4px 4px 0 0; border-top-right-radius: 20px; }
|
||||
.corner.bl { bottom: 0; left: 0; border-width: 0 0 4px 4px; border-bottom-left-radius: 20px; }
|
||||
.corner.br { bottom: 0; right: 0; border-width: 0 4px 4px 0; border-bottom-right-radius: 20px; }
|
||||
|
||||
/* Haz de escáner láser rojo / cyan */
|
||||
.laser-beam {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
height: 2.5px;
|
||||
background: #38bdf8;
|
||||
box-shadow: 0 0 14px 2px #38bdf8;
|
||||
border-radius: 2px;
|
||||
animation: laserSweep 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
||||
}
|
||||
|
||||
@keyframes laserSweep {
|
||||
0% { top: 12px; opacity: 0.3; }
|
||||
50% { top: 240px; opacity: 1; }
|
||||
100% { top: 12px; opacity: 0.3; }
|
||||
}
|
||||
|
||||
/* Flash verde de disparo exitoso */
|
||||
.flash-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(16, 185, 129, 0.45);
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
z-index: 30;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
.flash-overlay.active {
|
||||
display: flex;
|
||||
animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
@keyframes popIn {
|
||||
from { opacity: 0; transform: scale(0.95); }
|
||||
to { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
|
||||
.flash-badge {
|
||||
background: #065f46;
|
||||
color: #34d399;
|
||||
border: 2px solid #10b981;
|
||||
padding: 12px 24px;
|
||||
border-radius: 16px;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 900;
|
||||
text-align: center;
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
/* Controles de cámara flotantes */
|
||||
.cam-controls {
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
right: 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
z-index: 25;
|
||||
}
|
||||
|
||||
.cam-btn {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
background: rgba(15, 23, 42, 0.75);
|
||||
border: 1.5px solid rgba(255, 255, 255, 0.2);
|
||||
color: #ffffff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
backdrop-filter: blur(6px);
|
||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.cam-btn.active {
|
||||
background: #0284c7;
|
||||
border-color: #38bdf8;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* Barra inferior: Último disparo y botones de prueba */
|
||||
.pistola-footer {
|
||||
background: #1e293b;
|
||||
border-top: 1.5px solid #334155;
|
||||
padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px)) 14px;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.last-shot-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #0f172a;
|
||||
border: 1px solid #334155;
|
||||
border-radius: 12px;
|
||||
padding: 8px 12px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.last-shot-title {
|
||||
font-size: 0.68rem;
|
||||
color: #94a3b8;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.last-shot-value {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 900;
|
||||
color: #38bdf8;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.test-shortcuts-row {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.test-btn {
|
||||
flex: 1;
|
||||
min-width: 90px;
|
||||
padding: 8px 10px;
|
||||
background: #334155;
|
||||
color: #f1f5f9;
|
||||
border: 1px solid #475569;
|
||||
border-radius: 10px;
|
||||
font-size: 0.74rem;
|
||||
font-weight: 800;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.test-btn:active {
|
||||
transform: scale(0.96);
|
||||
background: #0284c7;
|
||||
border-color: #38bdf8;
|
||||
}
|
||||
|
||||
/* Mensaje de permiso / error */
|
||||
.cam-error-box {
|
||||
position: absolute;
|
||||
inset: 20px;
|
||||
background: rgba(15, 23, 42, 0.95);
|
||||
border: 1.5px solid #ef4444;
|
||||
border-radius: 18px;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
z-index: 28;
|
||||
}
|
||||
|
||||
.cam-error-box.active {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- CABECERA -->
|
||||
<header class="pistola-header">
|
||||
<div class="brand-box">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay">
|
||||
<div>
|
||||
<h1>Sibo<span>Pay</span> Handheld</h1>
|
||||
<p>Pistola QR Inalámbrica</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="connectionStatusBadge" class="status-badge connecting">
|
||||
<span class="status-dot"></span>
|
||||
<span id="lblConnectionStatus">Conectando...</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- BANNER COBRO ACTIVO EN PC -->
|
||||
<div id="posChargeBanner" class="pos-sync-banner">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<span style="font-size: 1.2rem;">⚡</span>
|
||||
<div>
|
||||
<div style="font-size: 0.72rem; text-transform: uppercase; opacity: 0.9;">Cobro en Caja Listo</div>
|
||||
<div id="lblChargeAmount" style="font-size: 1.05rem; font-weight: 900;">Esperando carné...</div>
|
||||
</div>
|
||||
</div>
|
||||
<span style="background: rgba(255,255,255,0.25); padding: 3px 8px; border-radius: 6px; font-size: 0.7rem;">¡Apunta!</span>
|
||||
</div>
|
||||
|
||||
<!-- VISOR DE CÁMARA CON MIRA LÁSER -->
|
||||
<main class="scanner-viewport">
|
||||
<video id="scannerVideo" playsinline autoplay muted></video>
|
||||
|
||||
<!-- Mira Láser -->
|
||||
<div class="aiming-reticle">
|
||||
<div class="corner tl"></div>
|
||||
<div class="corner tr"></div>
|
||||
<div class="corner bl"></div>
|
||||
<div class="corner br"></div>
|
||||
<div class="laser-beam"></div>
|
||||
</div>
|
||||
|
||||
<!-- Controles flotantes: Linterna y Alternar Cámara -->
|
||||
<div class="cam-controls">
|
||||
<button id="btnToggleTorch" onclick="toggleTorch()" class="cam-btn" title="Encender / Apagar Linterna" style="display: none;">
|
||||
🔦
|
||||
</button>
|
||||
<button onclick="flipCamera()" class="cam-btn" title="Cambiar Cámara">
|
||||
🔄
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Overlay de Disparo Exitoso -->
|
||||
<div id="shotSuccessOverlay" class="flash-overlay">
|
||||
<div class="flash-badge">
|
||||
<div style="font-size: 1.8rem; margin-bottom: 4px;">⚡ BEEP!</div>
|
||||
<div style="font-size: 0.9rem; font-weight: 800; color: #ffffff;">Disparo Enviado a Caja</div>
|
||||
<div id="lblSuccessToken" style="font-size: 0.78rem; opacity: 0.9; margin-top: 4px; font-family: monospace;">QR-MATEO-2026-A891</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Error / Permiso Denegado -->
|
||||
<div id="camErrorBox" class="cam-error-box">
|
||||
<div style="font-size: 2.5rem; margin-bottom: 8px;">📷</div>
|
||||
<h3 style="font-size: 1.1rem; font-weight: 900; margin-bottom: 6px;">Se requiere acceso a la cámara</h3>
|
||||
<p style="font-size: 0.8rem; color: #94a3b8; margin-bottom: 16px;">
|
||||
Para usar tu teléfono como pistola lectora, habilita el permiso de cámara en este navegador.
|
||||
</p>
|
||||
<button onclick="startScannerCamera()" style="padding: 10px 20px; background: #0284c7; color: white; border: none; border-radius: 10px; font-weight: 800; font-size: 0.85rem; cursor: pointer;">
|
||||
Reintentar Permiso
|
||||
</button>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- PIE DE PÁGINA: ESTADO Y BOTONES DE DISPARO RÁPIDO PARA PRUEBAS -->
|
||||
<footer class="pistola-footer">
|
||||
<div class="last-shot-box">
|
||||
<span class="last-shot-title">Último Disparo:</span>
|
||||
<span id="lblLastShot" class="last-shot-value">Ninguno</span>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 6px; font-size: 0.68rem; color: #94a3b8; font-weight: 700; text-transform: uppercase;">
|
||||
Disparo Rápido para Pruebas:
|
||||
</div>
|
||||
|
||||
<div class="test-shortcuts-row">
|
||||
<button type="button" onclick="sendDirectShot('QR-MATEO-2026-A891')" class="test-btn">
|
||||
🧒 Mateo (8a)
|
||||
</button>
|
||||
<button type="button" onclick="sendDirectShot('QR-SOFIA-2026-B442')" class="test-btn">
|
||||
👧 Sofía (9a)
|
||||
</button>
|
||||
<button type="button" onclick="sendDirectShot('QR-NACHO-2026-D902')" class="test-btn">
|
||||
🧑 Ignacio (14a)
|
||||
</button>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Librería jsQR para fallback si BarcodeDetector no está presente -->
|
||||
<script src="/js/jsQR.js"></script>
|
||||
|
||||
<script>
|
||||
// Variables de control de cámara y escaneo
|
||||
let videoStream = null;
|
||||
let videoTrack = null;
|
||||
let facingMode = 'environment';
|
||||
let isTorchOn = false;
|
||||
let isScanning = true;
|
||||
let lastScannedToken = null;
|
||||
let lastScannedTime = 0;
|
||||
let sseSource = null;
|
||||
// Inicializar Audio Web sintético (beeper de pistola POS) - DESACTIVADO
|
||||
function playLaserBeep() {}
|
||||
|
||||
// Vibración háptica
|
||||
function vibratePhone() {
|
||||
try {
|
||||
if (navigator.vibrate) {
|
||||
navigator.vibrate([70]);
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
// Inicializar Canal SSE con el Servidor
|
||||
function initSSEConnection() {
|
||||
const badge = document.getElementById('connectionStatusBadge');
|
||||
const lbl = document.getElementById('lblConnectionStatus');
|
||||
|
||||
if (sseSource) {
|
||||
sseSource.close();
|
||||
}
|
||||
|
||||
sseSource = new EventSource('/api/events');
|
||||
|
||||
sseSource.onopen = () => {
|
||||
badge.className = 'status-badge';
|
||||
lbl.textContent = 'En Línea • Conectado';
|
||||
};
|
||||
|
||||
sseSource.onerror = () => {
|
||||
badge.className = 'status-badge offline';
|
||||
lbl.textContent = 'Reconectando...';
|
||||
};
|
||||
|
||||
// Escuchar cuando la caja en la PC entra en modo de cobro
|
||||
sseSource.addEventListener('pistola_solicitud_cobro', (e) => {
|
||||
try {
|
||||
const data = JSON.parse(e.data);
|
||||
const banner = document.getElementById('posChargeBanner');
|
||||
const lblAmount = document.getElementById('lblChargeAmount');
|
||||
if (banner && lblAmount) {
|
||||
lblAmount.textContent = `₡${Number(data.total || 0).toLocaleString('es-CR')} (${data.itemsCount || 1} ítems)`;
|
||||
banner.classList.add('active');
|
||||
}
|
||||
playLaserBeep();
|
||||
vibratePhone();
|
||||
} catch (err) {}
|
||||
});
|
||||
|
||||
// Escuchar cuando la caja en la PC cancela o cierra el modal
|
||||
sseSource.addEventListener('pistola_cancelar_cobro', () => {
|
||||
const banner = document.getElementById('posChargeBanner');
|
||||
if (banner) banner.classList.remove('active');
|
||||
});
|
||||
}
|
||||
|
||||
// Inicializar Cámara
|
||||
async function startScannerCamera() {
|
||||
const video = document.getElementById('scannerVideo');
|
||||
const errBox = document.getElementById('camErrorBox');
|
||||
const btnTorch = document.getElementById('btnToggleTorch');
|
||||
|
||||
errBox.classList.remove('active');
|
||||
|
||||
if (videoStream) {
|
||||
videoStream.getTracks().forEach(t => t.stop());
|
||||
videoStream = null;
|
||||
}
|
||||
|
||||
try {
|
||||
videoStream = await navigator.mediaDevices.getUserMedia({
|
||||
video: {
|
||||
facingMode: { ideal: facingMode },
|
||||
width: { ideal: 1280 },
|
||||
height: { ideal: 720 }
|
||||
},
|
||||
audio: false
|
||||
});
|
||||
|
||||
video.srcObject = videoStream;
|
||||
await video.play();
|
||||
|
||||
videoTrack = videoStream.getVideoTracks()[0];
|
||||
|
||||
// Verificar soporte de linterna
|
||||
if (videoTrack) {
|
||||
const capabilities = videoTrack.getCapabilities ? videoTrack.getCapabilities() : {};
|
||||
if (capabilities.torch) {
|
||||
btnTorch.style.display = 'flex';
|
||||
} else {
|
||||
btnTorch.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
startDetectionLoop();
|
||||
} catch (err) {
|
||||
console.error('Error cámara:', err);
|
||||
errBox.classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
// Alternar linterna
|
||||
async function toggleTorch() {
|
||||
if (!videoTrack) return;
|
||||
try {
|
||||
isTorchOn = !isTorchOn;
|
||||
await videoTrack.applyConstraints({
|
||||
advanced: [{ torch: isTorchOn }]
|
||||
});
|
||||
const btn = document.getElementById('btnToggleTorch');
|
||||
if (btn) btn.classList.toggle('active', isTorchOn);
|
||||
} catch (e) {
|
||||
console.warn('Torch no soportado:', e);
|
||||
}
|
||||
}
|
||||
|
||||
// Cambiar cámara frontal / trasera
|
||||
function flipCamera() {
|
||||
facingMode = (facingMode === 'environment') ? 'user' : 'environment';
|
||||
isTorchOn = false;
|
||||
const btn = document.getElementById('btnToggleTorch');
|
||||
if (btn) btn.classList.remove('active');
|
||||
startScannerCamera();
|
||||
}
|
||||
|
||||
// Detección Ultra-Rápida de Código QR
|
||||
let scanCanvas = null;
|
||||
let scanCtx = null;
|
||||
let barcodeDetector = null;
|
||||
|
||||
if ('BarcodeDetector' in window) {
|
||||
try {
|
||||
barcodeDetector = new BarcodeDetector({ formats: ['qr_code'] });
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
function startDetectionLoop() {
|
||||
const video = document.getElementById('scannerVideo');
|
||||
|
||||
async function checkFrame() {
|
||||
if (!isScanning) return;
|
||||
|
||||
if (video && video.readyState >= video.HAVE_CURRENT_DATA) {
|
||||
try {
|
||||
// 1. Intentar con BarcodeDetector nativo (acelerado por hardware)
|
||||
if (barcodeDetector) {
|
||||
const barcodes = await barcodeDetector.detect(video);
|
||||
if (barcodes.length > 0 && barcodes[0].rawValue) {
|
||||
handleScannedCode(barcodes[0].rawValue);
|
||||
}
|
||||
} else if (window.jsQR) {
|
||||
// 2. Fallback a jsQR
|
||||
if (!scanCanvas) {
|
||||
scanCanvas = document.createElement('canvas');
|
||||
scanCtx = scanCanvas.getContext('2d', { willReadFrequently: true });
|
||||
}
|
||||
scanCanvas.width = video.videoWidth;
|
||||
scanCanvas.height = video.videoHeight;
|
||||
scanCtx.drawImage(video, 0, 0, scanCanvas.width, scanCanvas.height);
|
||||
const imgData = scanCtx.getImageData(0, 0, scanCanvas.width, scanCanvas.height);
|
||||
const code = window.jsQR(imgData.data, imgData.width, imgData.height, {
|
||||
inversionAttempts: 'dontInvert'
|
||||
});
|
||||
if (code && code.data) {
|
||||
handleScannedCode(code.data);
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
requestAnimationFrame(checkFrame);
|
||||
}
|
||||
|
||||
requestAnimationFrame(checkFrame);
|
||||
}
|
||||
|
||||
// Procesar Código QR Detectado
|
||||
async function handleScannedCode(rawToken) {
|
||||
if (!rawToken) return;
|
||||
const token = rawToken.trim();
|
||||
const now = Date.now();
|
||||
|
||||
// Cooldown de 2 segundos para evitar disparos duplicados involuntarios
|
||||
if (token === lastScannedToken && (now - lastScannedTime) < 2000) {
|
||||
return;
|
||||
}
|
||||
|
||||
lastScannedToken = token;
|
||||
lastScannedTime = now;
|
||||
|
||||
// Disparar feedback sonoro y háptico
|
||||
playLaserBeep();
|
||||
vibratePhone();
|
||||
|
||||
// Destello visual en pantalla
|
||||
showShotSuccess(token);
|
||||
|
||||
// Enviar disparo a la caja POS
|
||||
sendTokenToPos(token);
|
||||
}
|
||||
|
||||
function showShotSuccess(token) {
|
||||
const overlay = document.getElementById('shotSuccessOverlay');
|
||||
const lbl = document.getElementById('lblSuccessToken');
|
||||
const lblLast = document.getElementById('lblLastShot');
|
||||
|
||||
if (lbl) lbl.textContent = token;
|
||||
if (lblLast) lblLast.textContent = token;
|
||||
|
||||
if (overlay) {
|
||||
overlay.classList.add('active');
|
||||
setTimeout(() => {
|
||||
overlay.classList.remove('active');
|
||||
}, 800);
|
||||
}
|
||||
}
|
||||
|
||||
// Envío por API a la Terminal POS
|
||||
async function sendTokenToPos(token) {
|
||||
try {
|
||||
const res = await fetch('/api/pos/remote-scan', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
token: token,
|
||||
deviceName: navigator.userAgent.includes('iPhone') ? 'iPhone' : 'Android'
|
||||
})
|
||||
});
|
||||
const data = await res.json();
|
||||
console.log('📡 Disparo enviado exitosamente a la terminal:', data);
|
||||
} catch (err) {
|
||||
console.error('Error enviando disparo a la terminal:', err);
|
||||
}
|
||||
}
|
||||
|
||||
// Botones directos de prueba
|
||||
function sendDirectShot(token) {
|
||||
handleScannedCode(token);
|
||||
}
|
||||
|
||||
// Iniciar todo al cargar
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
initSSEConnection();
|
||||
startScannerCamera();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SiboPay POS - Terminal de Mostrador y Despacho</title>
|
||||
<link rel="icon" type="image/png" href="/img/sibopay-emblem.png">
|
||||
<link rel="stylesheet" href="/css/styles.css">
|
||||
<link rel="stylesheet" href="/css/styles.css?v=14.0">
|
||||
<style>
|
||||
/* Estilos específicos de terminal de alta velocidad */
|
||||
.student-badge-scanned {
|
||||
@@ -38,7 +38,51 @@
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* Formateo de impresión para Comanda / Ticket Térmico (58mm / 80mm) */
|
||||
@media print {
|
||||
body * {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
#posThermalReceipt, #posThermalReceipt * {
|
||||
visibility: visible !important;
|
||||
}
|
||||
#posThermalReceipt {
|
||||
position: fixed !important;
|
||||
left: 0 !important;
|
||||
top: 0 !important;
|
||||
width: 100% !important;
|
||||
max-width: 80mm !important;
|
||||
margin: 0 !important;
|
||||
padding: 4mm 2mm !important;
|
||||
font-family: 'Courier New', Courier, monospace !important;
|
||||
font-size: 12px !important;
|
||||
line-height: 1.3 !important;
|
||||
color: #000000 !important;
|
||||
background: #ffffff !important;
|
||||
display: block !important;
|
||||
z-index: 999999 !important;
|
||||
}
|
||||
@page {
|
||||
margin: 0;
|
||||
size: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function posLogout() {
|
||||
try {
|
||||
localStorage.removeItem('sibopay_token');
|
||||
localStorage.removeItem('sibopay_user');
|
||||
localStorage.removeItem('recreopay_token');
|
||||
localStorage.removeItem('recreopay_user');
|
||||
sessionStorage.clear();
|
||||
} catch (e) {}
|
||||
window.location.href = '/index.html';
|
||||
}
|
||||
window.posLogout = posLogout;
|
||||
</script>
|
||||
</head>
|
||||
<body class="pos-mobile-view-catalog" style="background: #f8fafc; color: #0f172a;">
|
||||
|
||||
<!-- BANNER DE ADVERTENCIA HTTPS PARA TERMINALES REMOTAS -->
|
||||
@@ -52,62 +96,99 @@
|
||||
<!-- BARRA DE PESTAÑAS MÓVIL (PANTALLAS <= 900px) -->
|
||||
<div class="pos-mobile-nav" id="posMobileNav">
|
||||
<button class="pos-mobile-nav-btn active" id="btnMobileNavCatalog" onclick="switchPosMobileView('catalog')">
|
||||
<span>🥪</span> Catálogo
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:inline-block; vertical-align:middle; margin-right:4px;"><rect width="7" height="7" x="3" y="3" rx="1"/><rect width="7" height="7" x="14" y="3" rx="1"/><rect width="7" height="7" x="14" y="14" rx="1"/><rect width="7" height="7" x="3" y="14" rx="1"/></svg> Catálogo
|
||||
</button>
|
||||
<button class="pos-mobile-nav-btn" id="btnMobileNavCheckout" onclick="switchPosMobileView('checkout')">
|
||||
<span>💳</span> Caja / Cobro QR
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:inline-block; vertical-align:middle; margin-right:4px;"><rect width="20" height="14" x="2" y="5" rx="2"/><line x1="2" x2="22" y1="10" y2="10"/></svg> Caja / Cobro QR
|
||||
<span class="pos-mobile-nav-badge" id="mobileCartBadge" style="display: none;">0</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- BANNER DE AVISOS GLOBALES PARA POS -->
|
||||
<div id="posGlobalBannerContainer" style="display: flex; flex-direction: column; gap: 8px; margin: 10px 14px 0 14px;"></div>
|
||||
|
||||
<div class="pos-layout">
|
||||
<!-- PANEL IZQUIERDO: CATÁLOGO TÁCTIL Y COLA DE PRE-ÓRDENES -->
|
||||
<div class="pos-catalog-pane">
|
||||
<div class="pos-header-card">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" style="width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(2, 132, 199, 0.3));">
|
||||
<div>
|
||||
<h1 style="font-size: 1.2rem; font-weight: 800; color: #0f172a; margin: 0;">SiboPay <span style="color: #0284c7;">Terminal Soda</span></h1>
|
||||
<span style="font-size: 0.76rem; color: #64748b;">Soda Escolar • Ventana de Atención Rápida</span>
|
||||
<div class="pos-header-card" style="display: flex; flex-direction: column; gap: 10px;">
|
||||
<!-- FILA SUPERIOR: MARCA A LA IZQUIERDA Y BOTÓN SALIR ÚNICO ARRIBA A LA DERECHA -->
|
||||
<div style="display: flex; justify-content: space-between; align-items: flex-start; width: 100%;">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" style="width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(2, 132, 199, 0.3));">
|
||||
<div>
|
||||
<h1 style="font-size: 1.2rem; font-weight: 800; color: #0f172a; margin: 0; line-height: 1.2;">SiboPay <span style="color: #0284c7;">Terminal Soda</span></h1>
|
||||
<span style="font-size: 0.74rem; color: #64748b;">Soda Escolar • Ventana de Atención Rápida</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BOTÓN SALIR: COLOCADO ARRIBA A LA DERECHA DE 'TERMINAL SODA' -->
|
||||
<button type="button" onclick="posLogout()" class="btn-saas" style="height: 32px; font-size: 0.82rem; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; cursor: pointer; color: #dc2626; background: #fef2f2; border: 1.5px solid #fecaca; border-radius: 9px; padding: 0 14px; box-shadow: 0 1px 3px rgba(220, 38, 38, 0.08); flex-shrink: 0;" title="Cerrar sesión de la terminal">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.3" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>
|
||||
<span>Salir</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;">
|
||||
<!-- FILA DE ESTADO: BADGES Y BOTÓN ADMIN A LA DERECHA DE NOTIFICACIONES -->
|
||||
<div style="display: flex; align-items: center; gap: 6px; flex-wrap: wrap;">
|
||||
<span id="pistolaStatusBadge" class="saas-status-badge" style="background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; font-weight: 700;" title="Pistola lectora USB/Bluetooth lista para escanear en cualquier momento">
|
||||
<span class="saas-dot" style="background: #0284c7;"></span>
|
||||
Pistola QR Conectada
|
||||
</span>
|
||||
<span class="saas-status-badge saas-status-active" title="Conexión en tiempo real activa">
|
||||
<span class="saas-dot"></span>
|
||||
En Línea (SSE)
|
||||
<span id="posNetworkStatusBadge" class="pos-network-pill online" title="Estado de conexión y sincronización con el servidor">
|
||||
<span style="width: 8px; height: 8px; border-radius: 50%; background: #16a34a; display: inline-block;"></span>
|
||||
<span id="posNetworkStatusText">En Línea</span>
|
||||
</span>
|
||||
<button id="btnPosNotificationToggle" onclick="enablePushNotificationsPrompt()" class="btn-saas btn-saas-outline" style="height: 30px; font-size: 0.76rem; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; color: #0284c7; border-color: #bae6fd;" title="Activar notificaciones de recargas en tiempo real">
|
||||
<span>🔔</span> <span id="lblPosNotificationStatus">Notificaciones</span>
|
||||
</button>
|
||||
<a href="/index.html" class="btn-saas btn-saas-outline" style="height: 30px; font-size: 0.76rem;">
|
||||
<span>👨🍳</span> Admin
|
||||
</a>
|
||||
<a href="/index.html" target="_blank" class="btn-saas btn-saas-outline" style="height: 30px; font-size: 0.76rem; color: #0284c7; border-color: #bae6fd;">
|
||||
<span>📱</span> PWA Estudiante ↗
|
||||
<button type="button" onclick="openPhonePairingModal()" class="btn-saas btn-saas-outline" style="height: 30px; font-size: 0.76rem; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; color: #0284c7; border-color: #bae6fd; font-weight: 700;" title="Vincular tu teléfono celular como pistola lectora QR inalámbrica">
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="20" x="5" y="2" rx="2" ry="2"/><line x1="12" y1="18" x2="12.01" y2="18"/></svg>
|
||||
<span>📱 Vincular Celular</span>
|
||||
</button>
|
||||
<a href="/index.html?tab=admin" class="btn-saas btn-saas-outline" style="height: 30px; font-size: 0.76rem; display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: #475569; border-color: #cbd5e1;" title="Ir al Panel de Administración">
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>
|
||||
<span>Admin</span>
|
||||
</a>
|
||||
<button type="button" onclick="ejecutarCierreDeCaja()" class="btn-saas" style="height: 30px; font-size: 0.76rem; display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: #92400e; background: #fef3c7; border: 1.5px solid #fde68a; border-radius: 8px; cursor: pointer;" title="Cierre de Caja del Día: finaliza el turno y cancela pre-órdenes no retiradas liberando el saldo a los estudiantes">
|
||||
<span>🌙</span>
|
||||
<span>Cierre de Caja</span>
|
||||
</button>
|
||||
<label style="display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; color: #475569; background: #ffffff; padding: 4px 10px; border-radius: 8px; border: 1.5px solid #cbd5e1; cursor: pointer; user-select: none;" title="Imprimir comanda o ticket térmico automáticamente al finalizar cada cobro">
|
||||
<input type="checkbox" id="chkPosAutoPrint" style="cursor: pointer; width: 14px; height: 14px;">
|
||||
<span>🖨️ Auto-imprimir ticket</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- BANNER DE RESILIENCIA OFFLINE DE LA SODA -->
|
||||
<div id="posOfflineQueueBanner" class="pos-offline-banner" style="display: none; border-radius: 12px; margin-top: 4px;">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<span style="font-size: 1.15rem;">⚡</span>
|
||||
<div>
|
||||
<strong style="display: block; font-size: 0.82rem; line-height: 1.2;">Modo Offline Activo</strong>
|
||||
<span id="lblPosOfflineCount" style="font-size: 0.72rem; opacity: 0.95;">0 ventas guardadas localmente esperando conexión.</span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" id="btnSyncOfflinePos" onclick="sincronizarVentasOfflineManual()" class="btn-saas" style="height: 30px; padding: 0 12px; background: white; color: #92400e; font-weight: 800; font-size: 0.76rem; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.15); border: none; cursor: pointer;">
|
||||
🔄 Sincronizar Ahora
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TABS DE MODO DE TERMINAL (RESPONSIVE SIN RECORTES) -->
|
||||
<div class="pos-tabs">
|
||||
<button class="pos-tab-btn active" id="tabBtnMostrador" onclick="switchPosTab('mostrador')">
|
||||
<span class="tab-icon">🛒</span>
|
||||
<span class="tab-icon"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="21" r="1"/><circle cx="19" cy="21" r="1"/><path d="M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12"/></svg></span>
|
||||
<span class="tab-label-full">Venta de Mostrador</span>
|
||||
<span class="tab-label-short">Mostrador</span>
|
||||
</button>
|
||||
<button class="pos-tab-btn" id="tabBtnPreordenes" onclick="switchPosTab('preordenes')">
|
||||
<span class="tab-icon">📦</span>
|
||||
<span class="tab-icon"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m7.5 4.27 9 5.15"/><path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"/><path d="m3.3 7 8.7 5 8.7-5"/><path d="M12 22V12"/></svg></span>
|
||||
<span class="tab-label-full">Fila Rápida Pre-Órdenes</span>
|
||||
<span class="tab-label-short">Pre-Órdenes</span>
|
||||
<span id="badgePreordenesCount" style="background: #ef4444; color: white; padding: 2px 7px; border-radius: 10px; font-size: 0.72rem; font-weight: 800;">0</span>
|
||||
</button>
|
||||
<button class="pos-tab-btn" id="tabBtnSinpe" onclick="switchPosTab('sinpe')">
|
||||
<span class="tab-icon">📱</span>
|
||||
<span class="tab-icon"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="20" x="5" y="2" rx="2" ry="2"/><path d="M12 18h.01"/></svg></span>
|
||||
<span class="tab-label-full">Recargas SINPE</span>
|
||||
<span class="tab-label-short">Recargas SINPE</span>
|
||||
<span id="badgeSinpeCount" style="background: #10b981; color: white; padding: 2px 7px; border-radius: 10px; font-size: 0.72rem; font-weight: 800; display: none;">0</span>
|
||||
@@ -127,7 +208,7 @@
|
||||
type="text"
|
||||
id="posProductSearch"
|
||||
class="pos-search-input"
|
||||
placeholder="Buscar por nombre, categoría o precio (ej: empanada, jugo, 1200, mep)..."
|
||||
placeholder="Buscar por nombre, categoría o precio (ej: empanada, jugo, 1200)..."
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
oninput="handlePosSearchInput(this.value)"
|
||||
@@ -169,19 +250,42 @@
|
||||
</div>
|
||||
<p style="font-size: 0.78rem; color: #64748b; margin: 3px 0 0 0;">Los estudiantes con pre-orden retiran en segundos escaneando su carné aquí.</p>
|
||||
</div>
|
||||
<div style="display: flex; gap: 8px; align-items: center; flex-wrap: wrap;">
|
||||
<button onclick="openPreOrderScanModal()" class="btn-saas btn-saas-primary" style="height: 36px; padding: 0 14px;">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>
|
||||
<span>Escanear QR para Entregar</span>
|
||||
<div style="display: flex; gap: 6px; align-items: center; flex-wrap: wrap;">
|
||||
<button onclick="openPreOrderScanModal()" class="btn-saas btn-saas-primary" style="height: 32px; padding: 0 12px; font-size: 0.76rem; border-radius: 8px;">
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>
|
||||
<span>Escanear QR</span>
|
||||
</button>
|
||||
<button onclick="loadPreOrders()" class="btn-saas btn-saas-outline" style="height: 36px; padding: 0 12px;">
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M3 21v-5h5"/></svg>
|
||||
<button onclick="loadPreOrders()" class="btn-saas btn-saas-outline" style="height: 32px; padding: 0 10px; font-size: 0.76rem; border-radius: 8px;">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M3 21v-5h5"/></svg>
|
||||
<span>Refrescar</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="preOrdersList" style="display: flex; flex-direction: column; gap: 12px;">
|
||||
<div class="pos-preorder-filter-bar">
|
||||
<button type="button" class="pos-filter-pill active" id="filterPillTodos" onclick="filterPreOrdersByMomento('todos')">
|
||||
<span>📋 Activas</span>
|
||||
<span class="pos-pill-count" id="countFilterTodos">0</span>
|
||||
</button>
|
||||
<button type="button" class="pos-filter-pill" id="filterPillRecreo_1" onclick="filterPreOrdersByMomento('recreo_1')">
|
||||
<span>🔔 1er Recreo (9:30 AM)</span>
|
||||
<span class="pos-pill-count" id="countFilterRecreo1">0</span>
|
||||
</button>
|
||||
<button type="button" class="pos-filter-pill" id="filterPillAlmuerzo" onclick="filterPreOrdersByMomento('almuerzo')">
|
||||
<span>🍲 Almuerzo (11:45 AM)</span>
|
||||
<span class="pos-pill-count" id="countFilterAlmuerzo">0</span>
|
||||
</button>
|
||||
<button type="button" class="pos-filter-pill" id="filterPillRecreo_2" onclick="filterPreOrdersByMomento('recreo_2')">
|
||||
<span>⏰ 2do Recreo (1:45 PM)</span>
|
||||
<span class="pos-pill-count" id="countFilterRecreo2">0</span>
|
||||
</button>
|
||||
<button type="button" class="pos-filter-pill pos-filter-pill-canceladas" id="filterPillCanceladas" onclick="filterPreOrdersByMomento('canceladas')" title="Ver pre-órdenes no retiradas que fueron canceladas y su dinero liberado">
|
||||
<span>🚫 Canceladas</span>
|
||||
<span class="pos-pill-count" id="countFilterCanceladas">0</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="preOrdersList" style="display: flex; flex-direction: column; gap: 8px;">
|
||||
<!-- Lista de pre-órdenes -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -196,7 +300,11 @@
|
||||
</div>
|
||||
<p style="font-size: 0.78rem; color: #64748b; margin: 3px 0 0 0;">Verifica que el dinero ingresó a la cuenta bancaria de la soda antes de aprobar la recarga.</p>
|
||||
</div>
|
||||
<div>
|
||||
<div style="display: flex; gap: 8px; align-items: center;">
|
||||
<a href="/api/admin/export/recargas.csv" target="_blank" class="btn-saas btn-saas-outline" style="height: 36px; padding: 0 12px; text-decoration: none; font-weight: 700; color: #0284c7; border-color: #bae6fd; background: #f0f9ff; display: inline-flex; align-items: center; gap: 6px;" title="Descargar reporte de todas las recargas SINPE en formato Excel">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
|
||||
<span>Exportar Excel</span>
|
||||
</a>
|
||||
<button onclick="loadSinpeRequests()" class="btn-saas btn-saas-outline" style="height: 36px; padding: 0 12px;">
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M3 21v-5h5"/></svg>
|
||||
<span>Refrescar</span>
|
||||
@@ -212,7 +320,9 @@
|
||||
<!-- BARRA FLOTANTE DE ACCESO RÁPIDO A CAJA EN MÓVIL -->
|
||||
<div id="posFloatingCheckoutBar" class="pos-floating-checkout-bar" onclick="switchPosMobileView('checkout')" style="display: none;">
|
||||
<div style="display: flex; align-items: center; gap: 10px;">
|
||||
<span style="font-size: 1.3rem;">🛒</span>
|
||||
<div style="width: 36px; height: 36px; border-radius: 50%; background: rgba(56, 189, 248, 0.2); display: flex; align-items: center; justify-content: center; color: #38bdf8;">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="21" r="1"/><circle cx="19" cy="21" r="1"/><path d="M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-weight: 800; font-size: 0.88rem; color: #ffffff;" id="posFloatingCartText">0 ítems</div>
|
||||
<div style="font-size: 0.72rem; color: #cbd5e1;">Toca para cobrar o escanear QR</div>
|
||||
@@ -390,6 +500,11 @@
|
||||
<strong id="pistolaSuccessBalance" style="color: #16a34a; font-size: 0.95rem;">-</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; gap: 8px; margin-bottom: 10px;">
|
||||
<button type="button" onclick="imprimirTicketTermico()" class="btn-saas btn-saas-outline" style="flex: 1; height: 40px; font-size: 0.86rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #0284c7; border-color: #bae6fd; background: #f0f9ff;" title="Imprimir ticket para impresora térmica de 58mm o 80mm">
|
||||
<span>🖨️ Imprimir Ticket Térmico</span>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" onclick="closePistolaModal()" class="btn-saas btn-saas-primary" style="width: 100%; height: 42px; background: #16a34a; border-color: #16a34a; font-size: 0.92rem; font-weight: 800;">
|
||||
Listo / Siguiente Alumno (Enter) ➔
|
||||
</button>
|
||||
@@ -437,7 +552,7 @@
|
||||
<input type="number" id="inputQuickProdPrecio" placeholder="1500" required min="1" step="50" style="width: 100%; padding: 10px 12px 10px 32px; border-radius: 10px; border: 1.5px solid #cbd5e1; background: #f8fafc; color: #0f172a; font-size: 1.1rem; font-weight: 900; box-sizing: border-box; outline: none;">
|
||||
</div>
|
||||
<span style="font-size: 0.72rem; color: #16a34a; margin-top: 6px; display: block; font-weight: 600;">
|
||||
🌿 Sello MEP Saludable asignado automáticamente (sin bloqueo parental)
|
||||
🌿 Alimento saludable asignado automáticamente (sin bloqueo parental)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -446,15 +561,139 @@
|
||||
Cancelar (Esc)
|
||||
</button>
|
||||
<button type="submit" id="btnSubmitQuickProd" class="btn-saas btn-saas-primary" style="flex: 2; height: 38px; background: #0f172a; border-color: #0f172a; font-size: 0.88rem; font-weight: 800;">
|
||||
<span>💾</span> Guardar y Cobrar ➔
|
||||
<span>Guardar y Cobrar ➔</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/sounds.js?v=8.6"></script>
|
||||
<!-- MODAL: VINCULAR TELÉFONO COMO PISTOLA QR INALÁMBRICA -->
|
||||
<div class="modal-qr-backdrop" id="modalPhonePairing" style="display: none;" onclick="closePhonePairingModal(event)">
|
||||
<div class="modal-qr-card" onclick="event.stopPropagation()" style="max-width: 440px; text-align: center; border-radius: 20px; padding: 22px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; border-bottom: 1px solid var(--border, #e2e8f0); padding-bottom: 8px;">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<span style="font-size: 1.3rem;">📱</span>
|
||||
<strong style="font-size: 1.05rem; color: var(--text-main, #0f172a);">Pistola QR en tu Celular</strong>
|
||||
</div>
|
||||
<button type="button" onclick="closePhonePairingModal()" style="background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted, #64748b);">✕</button>
|
||||
</div>
|
||||
<p style="font-size: 0.82rem; color: #64748b; margin-bottom: 14px; line-height: 1.4;">
|
||||
Apunta la cámara de tu teléfono a este código para activarlo como <strong>pistola lectora inalámbrica en tiempo real</strong>. Cualquier carné que escanees con tu celular se cobrará aquí al instante.
|
||||
</p>
|
||||
<div style="background: #ffffff; border: 2px solid #0284c7; border-radius: 16px; padding: 14px; display: inline-block; margin-bottom: 14px; box-shadow: 0 4px 14px rgba(2, 132, 199, 0.15);">
|
||||
<img id="imgPairingQr" src="/api/qr-image/http%3A%2F%2Flocalhost%2Fpistola.html" alt="QR Pistola" style="width: 200px; height: 200px; display: block; border-radius: 8px;">
|
||||
</div>
|
||||
<div style="display: flex; gap: 8px; justify-content: center; align-items: center; margin-bottom: 10px; flex-wrap: wrap;">
|
||||
<a id="linkDirectPistola" href="/pistola.html" target="_blank" class="btn-saas btn-saas-outline" style="font-size: 0.78rem; text-decoration: none;">
|
||||
Abrir Pistola en pestaña ↗
|
||||
</a>
|
||||
<button type="button" onclick="copyPistolaUrl()" class="btn-saas btn-saas-primary" style="font-size: 0.78rem;">
|
||||
Copiar Enlace
|
||||
</button>
|
||||
</div>
|
||||
<span id="lblCopyPistolaFeedback" style="font-size: 0.74rem; color: #10b981; font-weight: 800; display: none;">¡Enlace copiado al portapapeles!</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTENEDOR DE TICKET TÉRMICO OCULTO EN PANTALLA (VISIBLE EN IMPRESIÓN 58mm / 80mm) -->
|
||||
<div id="posThermalReceipt" style="display: none;"></div>
|
||||
|
||||
<!-- MODAL: RECHAZAR RECARGA SINPE CON MOTIVO Y TRAZABILIDAD -->
|
||||
<div class="modal-qr-backdrop" id="modalRechazarSinpe" style="display: none; z-index: 99999;">
|
||||
<div class="modal-qr-card" onclick="event.stopPropagation()" style="max-width: 440px; text-align: left; padding: 22px; border-radius: 18px;">
|
||||
|
||||
<!-- Encabezado -->
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; border-bottom: 1.5px solid var(--border, #e2e8f0); padding-bottom: 10px; margin-bottom: 14px;">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<span style="font-size: 1.3rem;">🚫</span>
|
||||
<div>
|
||||
<h3 style="margin: 0; font-size: 1.05rem; font-weight: 900; color: #991b1b;">Rechazar Recarga SINPE</h3>
|
||||
<span style="font-size: 0.72rem; color: #64748b;">Trazabilidad detallada para la soda y el padre</span>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" onclick="cerrarModalRechazoSinpe()" style="background: none; border: none; font-size: 1.3rem; color: #64748b; cursor: pointer; padding: 4px;">✕</button>
|
||||
</div>
|
||||
|
||||
<!-- Resumen de Solicitud -->
|
||||
<div style="background: rgba(148, 163, 184, 0.08); border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 0.80rem; line-height: 1.45;">
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<span style="color: #64748b;">Estudiante:</span>
|
||||
<strong id="rechazoSinpeEstudiante" style="color: #0f172a;">-</strong>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 3px;">
|
||||
<span style="color: #64748b;">Monto Solicitado:</span>
|
||||
<strong id="rechazoSinpeMonto" style="color: #0284c7; font-size: 0.92rem;">₡0</strong>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 3px;">
|
||||
<span style="color: #64748b;">Comprobante / Cód:</span>
|
||||
<strong id="rechazoSinpeComprobante" style="color: #334155;">-</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Motivo de Rechazo (Opciones Rápidas) -->
|
||||
<label style="display: block; font-size: 0.78rem; font-weight: 800; color: #0f172a; margin-bottom: 6px;">
|
||||
Selecciona el motivo del rechazo:
|
||||
</label>
|
||||
<div style="display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px;">
|
||||
<label class="sinpe-reject-option" style="display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 9px; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: #334155;">
|
||||
<input type="radio" name="sinpeRejectReason" value="fondos_no_recibidos" checked onchange="toggleSinpeRejectInputs()">
|
||||
<span>🚫 Fondos no recibidos en cuenta bancaria</span>
|
||||
</label>
|
||||
<label class="sinpe-reject-option" style="display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 9px; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: #334155;">
|
||||
<input type="radio" name="sinpeRejectReason" value="monto_no_coincide" onchange="toggleSinpeRejectInputs()">
|
||||
<span>⚠️ Monto no coincide con comprobante</span>
|
||||
</label>
|
||||
<label class="sinpe-reject-option" style="display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 9px; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: #334155;">
|
||||
<input type="radio" name="sinpeRejectReason" value="comprobante_invalido" onchange="toggleSinpeRejectInputs()">
|
||||
<span>📄 Comprobante falso, duplicado o ilegible</span>
|
||||
</label>
|
||||
<label class="sinpe-reject-option" style="display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 9px; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: #334155;">
|
||||
<input type="radio" name="sinpeRejectReason" value="telefono_no_coincide" onchange="toggleSinpeRejectInputs()">
|
||||
<span>📱 Teléfono o destinatario no coincide</span>
|
||||
</label>
|
||||
<label class="sinpe-reject-option" style="display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 9px; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: #334155;">
|
||||
<input type="radio" name="sinpeRejectReason" value="otro" onchange="toggleSinpeRejectInputs()">
|
||||
<span>✏️ Otro motivo personalizado</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Campo de Monto Real cuando el monto no coincide -->
|
||||
<div id="sinpeRejectMontoContainer" style="display: none; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px; margin-bottom: 12px;">
|
||||
<label style="display: block; font-size: 0.75rem; font-weight: 800; color: #92400e; margin-bottom: 4px;">
|
||||
¿De cuánto era realmente el SINPE recibido? (₡):
|
||||
</label>
|
||||
<input type="number" id="sinpeRejectMontoReal" placeholder="Ej: 1000" style="width: 100%; height: 36px; padding: 0 10px; border: 1.5px solid #fcd34d; border-radius: 8px; font-size: 0.88rem; font-weight: 800; color: #92400e; box-sizing: border-box;" oninput="updateSinpeRejectPreview()">
|
||||
<span id="sinpeRejectMontoPreview" style="display: block; font-size: 0.72rem; color: #b45309; margin-top: 4px; font-weight: 600;">
|
||||
Se intentaron recargar ₡0 pero el SINPE fue de ₡0
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Notas o detalles adicionales -->
|
||||
<div style="margin-bottom: 16px;">
|
||||
<label style="display: block; font-size: 0.75rem; font-weight: 700; color: #64748b; margin-bottom: 4px;">
|
||||
Detalle u observación adicional (opcional):
|
||||
</label>
|
||||
<input type="text" id="sinpeRejectNotasExtra" placeholder="Ej: Fondos no figuran en estado bancario al corte" style="width: 100%; height: 36px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 0.80rem; box-sizing: border-box;">
|
||||
</div>
|
||||
|
||||
<!-- Botones de Acción -->
|
||||
<div style="display: flex; gap: 8px; justify-content: flex-end;">
|
||||
<button type="button" onclick="cerrarModalRechazoSinpe()" class="btn-saas btn-saas-outline" style="height: 36px; padding: 0 14px; font-weight: 700;">
|
||||
Cancelar
|
||||
</button>
|
||||
<button type="button" id="btnConfirmarRechazoSinpe" onclick="confirmarRechazoSinpeModal()" class="btn-saas" style="height: 36px; padding: 0 16px; background: #dc2626; color: #ffffff; border: 1px solid #dc2626; font-weight: 800;">
|
||||
Confirmar Rechazo
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/dialogs.js?v=13.8"></script>
|
||||
<script src="/js/sounds.js?v=13.8"></script>
|
||||
<script src="/js/jsQR.js"></script>
|
||||
<script src="/js/pos.js?v=8.6"></script>
|
||||
<script src="/js/food-icons.js?v=1.1"></script>
|
||||
<script src="/js/pos.js?v=20.5"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
After Width: | Height: | Size: 648 KiB |
|
After Width: | Height: | Size: 620 KiB |
|
After Width: | Height: | Size: 208 KiB |
|
After Width: | Height: | Size: 924 KiB |
@@ -0,0 +1,627 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SiboPay — Carrusel Idéntico a Structured.app</title>
|
||||
<script src="https://www.gstatic.com/antigravity/web/dev/tailwindcss.min.js"></script>
|
||||
<style>
|
||||
@keyframes marquee-left {
|
||||
0% { transform: translateX(0); }
|
||||
100% { transform: translateX(-50%); }
|
||||
}
|
||||
@keyframes marquee-right {
|
||||
0% { transform: translateX(-50%); }
|
||||
100% { transform: translateX(0); }
|
||||
}
|
||||
.track-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: max-content;
|
||||
animation: marquee-left 48s linear infinite;
|
||||
}
|
||||
.track-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: max-content;
|
||||
animation: marquee-right 52s linear infinite;
|
||||
}
|
||||
.marquee-row:hover .track-left,
|
||||
.marquee-row:hover .track-right {
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.mask-fade {
|
||||
-webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
|
||||
mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
|
||||
}
|
||||
.bg-smooth-transition {
|
||||
transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
/* Structured Card Glow */
|
||||
.structured-card {
|
||||
width: 646px;
|
||||
height: 193px;
|
||||
border-radius: 100px;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.6);
|
||||
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
|
||||
}
|
||||
.structured-card:hover {
|
||||
transform: scale(1.02);
|
||||
box-shadow: 0 20px 42px -6px rgba(0, 0, 0, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body id="pageBody" class="bg-smooth-transition antialiased text-slate-800 m-0 p-0 selection:bg-sky-200 overflow-x-hidden" style="background-color: #e0f2fe;">
|
||||
|
||||
<!-- NAVEGACIÓN FLOTANTE LIQUID GLASS -->
|
||||
<nav class="fixed top-0 left-0 w-full z-50 flex items-center justify-center px-4 py-3 pointer-events-none">
|
||||
<div class="w-full max-w-5xl pointer-events-auto flex items-center justify-between px-6 py-2.5 rounded-full bg-white/45 backdrop-blur-2xl border border-white/60 shadow-[0_8px_30px_rgba(0,0,0,0.06)]">
|
||||
<div class="flex items-center gap-2.5">
|
||||
<div class="w-9 h-9 rounded-full bg-gradient-to-tr from-sky-600 to-cyan-400 flex items-center justify-center text-white font-extrabold text-lg shadow-sm">
|
||||
S
|
||||
</div>
|
||||
<span class="text-xl font-bold tracking-tight text-slate-900">sibopay</span>
|
||||
<span class="text-[12px] font-semibold px-2.5 py-0.5 rounded-full bg-white/80 text-sky-800 border border-sky-200/60 ml-1">Structured 1:1</span>
|
||||
</div>
|
||||
|
||||
<div class="hidden md:flex items-center gap-6 text-[15px] font-medium text-slate-700 lowercase">
|
||||
<a href="#reviews" class="hover:text-sky-600 transition-colors">carrusel de cápsulas</a>
|
||||
<a href="#features" class="hover:text-sky-600 transition-colors">discos interactivos</a>
|
||||
<a href="#timeline" class="hover:text-sky-600 transition-colors">agenda visual</a>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<button onclick="toggleBackground()" class="px-3.5 py-1.5 rounded-full bg-white/70 hover:bg-white text-slate-700 text-xs font-semibold border border-white/80 shadow-xs transition-all flex items-center gap-1.5 cursor-pointer">
|
||||
<span>🎨 Cambiar Fondo</span>
|
||||
</button>
|
||||
<button class="px-5 py-2 rounded-full bg-slate-900 hover:bg-sky-600 text-white text-sm font-semibold transition-all duration-300 shadow-sm cursor-pointer">
|
||||
Probar en vivo
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- HERO TITLE -->
|
||||
<section class="pt-32 pb-8 px-6 text-center max-w-4xl mx-auto">
|
||||
<div class="inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/70 backdrop-blur-md border border-white shadow-xs text-xs font-bold text-sky-800 mb-6">
|
||||
<span class="w-2 h-2 rounded-full bg-sky-500 animate-pulse"></span>
|
||||
CARRUSEL DE CÁPSULAS Y CONECTORES DE STRUCTURED.APP
|
||||
</div>
|
||||
|
||||
<h1 class="text-4xl sm:text-6xl font-light text-slate-900 lowercase tracking-tight leading-none mb-4">
|
||||
el carrusel idéntico de <br/>
|
||||
<span class="font-extrabold text-sky-800" id="heroTitleSpan">structured con los colores de sibopay</span>
|
||||
</h1>
|
||||
|
||||
<p class="text-base sm:text-lg text-slate-600 font-medium max-w-2xl mx-auto mb-6">
|
||||
Cápsulas gigantes de <strong class="text-slate-900">646px × 193px</strong> con <strong class="text-slate-900">radio de curvatura de 100px</strong>, estrellas doradas, conectores visuales tipo rompecabezas y dos filas que se desplazan de forma continua en sentidos opuestos.
|
||||
</p>
|
||||
|
||||
<!-- PALETA DE COLOR ACTIVA -->
|
||||
<div class="flex flex-wrap items-center justify-center gap-2 mb-2">
|
||||
<button onclick="setTheme('#e0f2fe')" class="px-3.5 py-1 rounded-full text-xs font-bold bg-white text-sky-800 shadow-xs cursor-pointer border border-sky-200">🧊 Cielo SiboPay</button>
|
||||
<button onclick="setTheme('#d1fae5')" class="px-3.5 py-1 rounded-full text-xs font-bold bg-white/70 hover:bg-white text-emerald-800 shadow-xs cursor-pointer border border-emerald-200">🍃 Menta Recargas</button>
|
||||
<button onclick="setTheme('#ffedd5')" class="px-3.5 py-1 rounded-full text-xs font-bold bg-white/70 hover:bg-white text-orange-800 shadow-xs cursor-pointer border border-orange-200">🍑 Melocotón Pastel</button>
|
||||
<button onclick="setTheme('#f3e8ff')" class="px-3.5 py-1 rounded-full text-xs font-bold bg-white/70 hover:bg-white text-purple-800 shadow-xs cursor-pointer border border-purple-200">💜 Lavanda Relax</button>
|
||||
<button onclick="setTheme('#fef08a')" class="px-3.5 py-1 rounded-full text-xs font-bold bg-white/70 hover:bg-white text-amber-800 shadow-xs cursor-pointer border border-amber-200">🌻 Vainilla Cálido</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- SECCIÓN: EL CARRUSEL EXACTO DE STRUCTURED (COMMUNITY REVIEWS) -->
|
||||
<!-- ============================================================ -->
|
||||
<section id="reviews" class="py-10 overflow-hidden relative">
|
||||
<div class="text-center lowercase mx-auto px-5 mb-8">
|
||||
<div class="text-slate-600 text-lg sm:text-2xl font-light tracking-tight">más de 50.000 clientes satisfechos</div>
|
||||
<div class="text-slate-900 text-3xl sm:text-5xl font-extrabold tracking-tight">experiencias en tiempo real</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-6 mask-fade marquee-row">
|
||||
|
||||
<!-- ======================================================== -->
|
||||
<!-- FILA 1: MOVIMIENTO CONTINUO HACIA LA IZQUIERDA (48s) -->
|
||||
<!-- ======================================================== -->
|
||||
<div class="overflow-hidden w-full h-[205px]">
|
||||
<div class="track-left flex items-center gap-0">
|
||||
|
||||
<!-- CÁPSULA 1: SIBOPAY CYAN / AZUL CIELO (646px x 193px, border-radius 100px) -->
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<!-- 5 Estrellas Doradas -->
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“La recarga por SINPE Móvil entra en 2 segundos y a mi hijo le llega el saldo de inmediato. Cero filas en la soda.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">💬</span>
|
||||
<span class="text-xs font-bold text-white/90">Reseña WhatsApp de Padres</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR 1 (Puzzle Link entre Cápsula 1 y 2) -->
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<!-- CÁPSULA 2: VIOLETA / LAVANDA STRUCTURED -->
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Cuando alguien agenda un servicio en mi página, le llega el WhatsApp con la ruta de Waze al instante. Espectacular.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">📸</span>
|
||||
<span class="text-xs font-bold text-white/90">Instagram Comment</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR 2 -->
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<!-- CÁPSULA 3: MENTA / VERDE SALVIA -->
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #10b981 0%, #047857 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Tengo dos páginas web con el mismo número de WhatsApp enviando recordatorios automáticos sin pagar líneas extra.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">⭐</span>
|
||||
<span class="text-xs font-bold text-white/90">Google Business Review</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR 3 -->
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<!-- CÁPSULA 4: MELOCOTÓN / CORAL CÁLIDO -->
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Los banners de aviso en tiempo real nos salvaron cuando tuvimos que pausar el comedor. Todos los papás lo vieron.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">🍎</span>
|
||||
<span class="text-xs font-bold text-white/90">App Store Review</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR 4 -->
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<!-- DUPLICACIÓN EXACTA DE FILA 1 PARA LOOP INFINITO PERFECTO -->
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“La recarga por SINPE Móvil entra en 2 segundos y a mi hijo le llega el saldo de inmediato. Cero filas en la soda.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">💬</span>
|
||||
<span class="text-xs font-bold text-white/90">Reseña WhatsApp de Padres</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Cuando alguien agenda un servicio en mi página, le llega el WhatsApp con la ruta de Waze al instante. Espectacular.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">📸</span>
|
||||
<span class="text-xs font-bold text-white/90">Instagram Comment</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #10b981 0%, #047857 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Tengo dos páginas web con el mismo número de WhatsApp enviando recordatorios automáticos sin pagar líneas extra.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">⭐</span>
|
||||
<span class="text-xs font-bold text-white/90">Google Business Review</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Los banners de aviso en tiempo real nos salvaron cuando tuvimos que pausar el comedor. Todos los papás lo vieron.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">🍎</span>
|
||||
<span class="text-xs font-bold text-white/90">App Store Review</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ======================================================== -->
|
||||
<!-- FILA 2: MOVIMIENTO CONTINUO HACIA LA DERECHA (52s) -->
|
||||
<!-- ======================================================== -->
|
||||
<div class="overflow-hidden w-full h-[205px]">
|
||||
<div class="track-right flex items-center gap-0">
|
||||
|
||||
<!-- CÁPSULA B1: ROSA EMPOVRADO PASTEL -->
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Poder bloquear alimentos chatarra y alergenos en caja desde mi celular me da una tranquilidad inmensa como mamá.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">🛡️</span>
|
||||
<span class="text-xs font-bold text-white/90">Comentario Portal Padres</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR B1 -->
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<!-- CÁPSULA B2: AMBAR / MIEL PASTEL -->
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Mi peluquería ahora llena la agenda sola. Los clientes reservan a la medianoche y les llega la confirmación por correo y WhatsApp.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">✂️</span>
|
||||
<span class="text-xs font-bold text-white/90">Testimonio de Comercio</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR B2 -->
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<!-- CÁPSULA B3: AZUL ACERO PASTEL -->
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“El interruptor en caliente para pausar SINPE Móvil nos permitió hacer mantenimiento sin que ningún padre tuviera errores.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">⚙️</span>
|
||||
<span class="text-xs font-bold text-white/90">Panel de Administración</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR B3 -->
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<!-- CÁPSULA B4: VERDE ESMERALDA DEEP -->
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #059669 0%, #064e3b 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Comprar con carné digital por QR es más rápido que pagar con efectivo. Despachamos 300 estudiantes en 15 minutos.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">🥪</span>
|
||||
<span class="text-xs font-bold text-white/90">Cajero Soda Escolar</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONECTOR B4 -->
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<!-- DUPLICACIÓN EXACTA DE FILA 2 PARA LOOP INFINITO PERFECTO -->
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Poder bloquear alimentos chatarra y alergenos en caja desde mi celular me da una tranquilidad inmensa como mamá.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">🛡️</span>
|
||||
<span class="text-xs font-bold text-white/90">Comentario Portal Padres</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Mi peluquería ahora llena la agenda sola. Los clientes reservan a la medianoche y les llega la confirmación por correo y WhatsApp.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">✂️</span>
|
||||
<span class="text-xs font-bold text-white/90">Testimonio de Comercio</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“El interruptor en caliente para pausar SINPE Móvil nos permitió hacer mantenimiento sin que ningún padre tuviera errores.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">⚙️</span>
|
||||
<span class="text-xs font-bold text-white/90">Panel de Administración</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
<div class="structured-card flex flex-col items-center justify-center text-center text-white" style="background: linear-gradient(135deg, #059669 0%, #064e3b 100%);">
|
||||
<div class="flex flex-col items-center justify-center px-12 py-5" style="transform: translateY(-4px);">
|
||||
<div class="flex items-center gap-1 mb-2 text-amber-300 text-lg">
|
||||
★ ★ ★ ★ ★
|
||||
</div>
|
||||
<p class="text-[18px] font-medium leading-[1.35] tracking-[-0.4px] text-white/95 max-w-[520px]">
|
||||
“Comprar con carné digital por QR es más rápido que pagar con efectivo. Despachamos 300 estudiantes en 15 minutos.”
|
||||
</p>
|
||||
<div class="flex items-center gap-2 mt-2.5">
|
||||
<span class="w-5 h-5 rounded-full bg-white/20 flex items-center justify-center text-[10px]">🥪</span>
|
||||
<span class="text-xs font-bold text-white/90">Cajero Soda Escolar</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-shrink-0 flex items-center justify-center relative z-0" style="width: 32px; height: 20px;">
|
||||
<div style="width: 52px; height: 16px; border-radius: 9999px; background: rgba(255,255,255,0.7); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 2px solid white;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- SECCIÓN 2: DISCOS REDONDOS PASTEL ("EXPLORE MORE FEATURES") -->
|
||||
<!-- ============================================================ -->
|
||||
<section id="features" class="py-16 px-6 max-w-5xl mx-auto">
|
||||
<div class="text-center lowercase mx-auto mb-12">
|
||||
<div class="text-slate-600 text-lg sm:text-2xl font-light tracking-tight">explora todas las</div>
|
||||
<div class="text-slate-900 text-3xl sm:text-5xl font-extrabold tracking-tight">funcionalidades</div>
|
||||
</div>
|
||||
|
||||
<!-- FILA DE DISCOS CIRCULARES DE 178px IDÉNTICOS A STRUCTURED.APP -->
|
||||
<div class="flex items-center justify-center flex-wrap gap-8 sm:gap-12">
|
||||
|
||||
<!-- Disco 1: Pagos SINPE -->
|
||||
<div class="flex flex-col items-center gap-3 cursor-pointer group" onclick="setTheme('#e0f2fe')">
|
||||
<div class="w-40 h-40 sm:w-44 sm:h-44 rounded-full bg-gradient-to-tr from-sky-400 to-cyan-200 p-1 shadow-lg group-hover:scale-105 group-hover:shadow-xl transition-all duration-300 flex items-center justify-center">
|
||||
<div class="w-full h-full rounded-full bg-white/30 backdrop-blur-md flex flex-col items-center justify-center text-slate-900">
|
||||
<span class="text-4xl mb-1">💳</span>
|
||||
<span class="text-xs font-bold uppercase tracking-wider text-sky-950">sinpe móvil</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center lowercase text-slate-800 text-xl font-bold leading-tight">
|
||||
pagos<br/><span class="font-light text-slate-600">instantáneos</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Disco 2: WhatsApp Meta API -->
|
||||
<div class="flex flex-col items-center gap-3 cursor-pointer group" onclick="setTheme('#d1fae5')">
|
||||
<div class="w-40 h-40 sm:w-44 sm:h-44 rounded-full bg-gradient-to-tr from-emerald-400 to-teal-200 p-1 shadow-lg group-hover:scale-105 group-hover:shadow-xl transition-all duration-300 flex items-center justify-center">
|
||||
<div class="w-full h-full rounded-full bg-white/30 backdrop-blur-md flex flex-col items-center justify-center text-slate-900">
|
||||
<span class="text-4xl mb-1">💬</span>
|
||||
<span class="text-xs font-bold uppercase tracking-wider text-emerald-950">meta api</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center lowercase text-slate-800 text-xl font-bold leading-tight">
|
||||
whatsapp<br/><span class="font-light text-slate-600">automático</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Disco 3: Agenda 24/7 -->
|
||||
<div class="flex flex-col items-center gap-3 cursor-pointer group" onclick="setTheme('#f3e8ff')">
|
||||
<div class="w-40 h-40 sm:w-44 sm:h-44 rounded-full bg-gradient-to-tr from-purple-400 to-violet-200 p-1 shadow-lg group-hover:scale-105 group-hover:shadow-xl transition-all duration-300 flex items-center justify-center">
|
||||
<div class="w-full h-full rounded-full bg-white/30 backdrop-blur-md flex flex-col items-center justify-center text-slate-900">
|
||||
<span class="text-4xl mb-1">🗓️</span>
|
||||
<span class="text-xs font-bold uppercase tracking-wider text-purple-950">turnos 24/7</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center lowercase text-slate-800 text-xl font-bold leading-tight">
|
||||
reservas<br/><span class="font-light text-slate-600">sin llamadas</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Disco 4: Banners Globales -->
|
||||
<div class="flex flex-col items-center gap-3 cursor-pointer group" onclick="setTheme('#ffedd5')">
|
||||
<div class="w-40 h-40 sm:w-44 sm:h-44 rounded-full bg-gradient-to-tr from-orange-400 to-amber-200 p-1 shadow-lg group-hover:scale-105 group-hover:shadow-xl transition-all duration-300 flex items-center justify-center">
|
||||
<div class="w-full h-full rounded-full bg-white/30 backdrop-blur-md flex flex-col items-center justify-center text-slate-900">
|
||||
<span class="text-4xl mb-1">📢</span>
|
||||
<span class="text-xs font-bold uppercase tracking-wider text-amber-950">difusión</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center lowercase text-slate-800 text-xl font-bold leading-tight">
|
||||
avisos<br/><span class="font-light text-slate-600">en caliente</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Disco 5: Control Total -->
|
||||
<div class="flex flex-col items-center gap-3 cursor-pointer group" onclick="setTheme('#fef08a')">
|
||||
<div class="w-40 h-40 sm:w-44 sm:h-44 rounded-full bg-gradient-to-tr from-yellow-400 to-amber-100 p-1 shadow-lg group-hover:scale-105 group-hover:shadow-xl transition-all duration-300 flex items-center justify-center">
|
||||
<div class="w-full h-full rounded-full bg-white/30 backdrop-blur-md flex flex-col items-center justify-center text-slate-900">
|
||||
<span class="text-4xl mb-1">🛡️</span>
|
||||
<span class="text-xs font-bold uppercase tracking-wider text-yellow-950">seguridad</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center lowercase text-slate-800 text-xl font-bold leading-tight">
|
||||
control<br/><span class="font-light text-slate-600">parental</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- SECCIÓN 3: AGENDA TIMELINE VISUAL DE STRUCTURED -->
|
||||
<!-- ============================================================ -->
|
||||
<section id="timeline" class="py-12 px-6 max-w-3xl mx-auto">
|
||||
<div class="text-center lowercase mx-auto mb-8">
|
||||
<div class="text-slate-600 text-lg sm:text-2xl font-light tracking-tight">una sola línea de tiempo</div>
|
||||
<div class="text-slate-900 text-3xl sm:text-5xl font-extrabold tracking-tight">tu día organizado bloque a bloque</div>
|
||||
</div>
|
||||
|
||||
<div class="relative pl-6 sm:pl-8 border-l-2 border-sky-400/60 flex flex-col gap-4 my-6">
|
||||
|
||||
<!-- Bloque 1 -->
|
||||
<div class="p-5 rounded-[28px] bg-white/80 backdrop-blur-md border border-white shadow-xs flex items-center justify-between gap-4">
|
||||
<div class="flex items-center gap-3.5">
|
||||
<span class="w-12 h-12 rounded-2xl bg-sky-100 text-sky-700 flex items-center justify-center text-2xl shrink-0">💳</span>
|
||||
<div>
|
||||
<div class="text-xs font-bold text-sky-700">08:00 AM • Pagos</div>
|
||||
<h4 class="text-base font-extrabold text-slate-900">Recarga SINPE de ₡10,000 confirmada</h4>
|
||||
<p class="text-xs text-slate-500">Comprobante #9412 verificado automáticamente</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="px-3 py-1 rounded-full bg-emerald-100 text-emerald-800 text-xs font-bold">Completado ✅</span>
|
||||
</div>
|
||||
|
||||
<!-- Bloque 2 -->
|
||||
<div class="p-5 rounded-[28px] bg-white/80 backdrop-blur-md border border-white shadow-xs flex items-center justify-between gap-4">
|
||||
<div class="flex items-center gap-3.5">
|
||||
<span class="w-12 h-12 rounded-2xl bg-purple-100 text-purple-700 flex items-center justify-center text-2xl shrink-0">✂️</span>
|
||||
<div>
|
||||
<div class="text-xs font-bold text-purple-700">11:30 AM • Cita de Servicio</div>
|
||||
<h4 class="text-base font-extrabold text-slate-900">Corte & Tratamiento Capilar</h4>
|
||||
<p class="text-xs text-slate-500">Recordatorio de WhatsApp enviado al cliente</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="px-3 py-1 rounded-full bg-purple-100 text-purple-800 text-xs font-bold">En 45 min</span>
|
||||
</div>
|
||||
|
||||
<!-- Bloque 3 -->
|
||||
<div class="p-5 rounded-[28px] bg-white/80 backdrop-blur-md border border-white shadow-xs flex items-center justify-between gap-4">
|
||||
<div class="flex items-center gap-3.5">
|
||||
<span class="w-12 h-12 rounded-2xl bg-amber-100 text-amber-700 flex items-center justify-center text-2xl shrink-0">🥪</span>
|
||||
<div>
|
||||
<div class="text-xs font-bold text-amber-700">01:45 PM • Comedor</div>
|
||||
<h4 class="text-base font-extrabold text-slate-900">Despacho de Pre-órdenes</h4>
|
||||
<p class="text-xs text-slate-500">Alergias validadas: 0 incidentes reportados</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="px-3 py-1 rounded-full bg-amber-100 text-amber-800 text-xs font-bold">Programado ☕</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- PIE DE PÁGINA -->
|
||||
<footer class="py-12 px-6 border-t border-white/60 text-center text-xs text-slate-600 font-medium">
|
||||
<div class="max-w-4xl mx-auto flex flex-col sm:flex-row items-center justify-between gap-4">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-6 h-6 rounded-full bg-sky-600 text-white flex items-center justify-center font-bold text-xs">S</div>
|
||||
<span class="font-bold text-slate-900 text-sm">SiboPay</span>
|
||||
<span>• Réplica 1:1 Carrusel Structured.app</span>
|
||||
</div>
|
||||
<div>646px × 193px Pills • Border Radius 100px • Interlocking Connectors</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
const themes = ['#e0f2fe', '#d1fae5', '#ffedd5', '#f3e8ff', '#fef08a'];
|
||||
let themeIdx = 0;
|
||||
|
||||
function setTheme(hex) {
|
||||
const body = document.getElementById('pageBody');
|
||||
if (body) body.style.backgroundColor = hex;
|
||||
}
|
||||
|
||||
function toggleBackground() {
|
||||
themeIdx = (themeIdx + 1) % themes.length;
|
||||
setTheme(themes[themeIdx]);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,17 +1,24 @@
|
||||
// RecreoPay PWA Service Worker v8.5 - Soporte Web Push VAPID en Segundo Plano
|
||||
const CACHE_NAME = 'recreopay-v8.5';
|
||||
// SiboPay PWA Service Worker v20.9 - Ultra Fast Startup & Stale-While-Revalidate
|
||||
const CACHE_NAME = 'sibopay-v20.9';
|
||||
const STATIC_ASSETS = [
|
||||
'/',
|
||||
'/index.html',
|
||||
'/eliminar-cuenta.html',
|
||||
'/pos.html',
|
||||
'/pistola.html',
|
||||
'/carnet.html',
|
||||
'/manifest.json',
|
||||
'/css/styles.css',
|
||||
'/js/app.js',
|
||||
'/js/pos.js',
|
||||
'/js/sounds.js',
|
||||
'/css/styles.css?v=20.0',
|
||||
'/css/desktop.css?v=2.2',
|
||||
'/js/dialogs.js?v=19.4',
|
||||
'/js/app.js?v=20.9',
|
||||
'/js/pos.js?v=20.5',
|
||||
'/js/sounds.js?v=19.4',
|
||||
'/js/food-icons.js?v=19.4',
|
||||
'/icons/icon-192.png',
|
||||
'/icons/icon-512.png'
|
||||
'/icons/icon-512.png',
|
||||
'/img/sibopay-emblem.png',
|
||||
'/apple-touch-icon.png'
|
||||
];
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
@@ -40,11 +47,11 @@ self.addEventListener('activate', (event) => {
|
||||
);
|
||||
});
|
||||
|
||||
// Network-First con fallback a caché para navegación y recursos estáticos
|
||||
// Estrategia Stale-While-Revalidate para apertura instantánea (0ms) en móviles
|
||||
self.addEventListener('fetch', (event) => {
|
||||
const url = new URL(event.request.url);
|
||||
|
||||
// APIs y Server-Sent Events (SSE): Directo a red sin caché
|
||||
// APIs y Server-Sent Events (SSE): Directo a red en tiempo real sin caché
|
||||
if (url.pathname.startsWith('/api/') || url.pathname.startsWith('/events')) {
|
||||
return;
|
||||
}
|
||||
@@ -55,24 +62,33 @@ self.addEventListener('fetch', (event) => {
|
||||
}
|
||||
|
||||
event.respondWith(
|
||||
fetch(event.request)
|
||||
.then((networkResponse) => {
|
||||
if (networkResponse && networkResponse.status === 200) {
|
||||
const responseClone = networkResponse.clone();
|
||||
caches.open(CACHE_NAME).then((cache) => {
|
||||
cache.put(event.request, responseClone);
|
||||
});
|
||||
}
|
||||
return networkResponse;
|
||||
})
|
||||
.catch(() => {
|
||||
return caches.match(event.request).then((cachedResponse) => {
|
||||
if (cachedResponse) return cachedResponse;
|
||||
caches.match(event.request).then((cachedResponse) => {
|
||||
// Lanzar actualización en segundo plano (revalidate) sin bloquear la pantalla
|
||||
const fetchPromise = fetch(event.request)
|
||||
.then((networkResponse) => {
|
||||
if (networkResponse && networkResponse.status === 200) {
|
||||
const responseClone = networkResponse.clone();
|
||||
caches.open(CACHE_NAME).then((cache) => {
|
||||
cache.put(event.request, responseClone);
|
||||
});
|
||||
}
|
||||
return networkResponse;
|
||||
})
|
||||
.catch(() => {
|
||||
// Si no hay red y era navegación, retornar index.html en caché
|
||||
if (event.request.mode === 'navigate') {
|
||||
return caches.match('/index.html');
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
// Si ya está en la memoria del teléfono, entregar INMEDIATAMENTE (<15ms)
|
||||
if (cachedResponse) {
|
||||
return cachedResponse;
|
||||
}
|
||||
|
||||
// Si es la primera vez que se descarga, esperar la respuesta de red
|
||||
return fetchPromise;
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
@@ -83,18 +99,18 @@ self.addEventListener('push', (event) => {
|
||||
try {
|
||||
data = event.data.json();
|
||||
} catch (e) {
|
||||
data = { title: '🔔 RecreoPay', body: event.data.text() };
|
||||
data = { title: '🔔 SiboPay', body: event.data.text() };
|
||||
}
|
||||
}
|
||||
|
||||
const title = data.title || '🔔 RecreoPay';
|
||||
const title = data.title || '🔔 SiboPay';
|
||||
const options = {
|
||||
body: data.body || 'Tienes una nueva notificación de RecreoPay',
|
||||
body: data.body || 'Tienes una nueva notificación de SiboPay',
|
||||
icon: data.icon || '/icons/icon-192.png',
|
||||
badge: data.badge || '/icons/icon-192.png',
|
||||
vibrate: [250, 100, 250, 100, 250],
|
||||
data: data.data || { url: '/pos.html?tab=sinpe' },
|
||||
tag: data.tag || `recreopay-push-${Date.now()}`,
|
||||
tag: data.tag || `sibopay-push-${Date.now()}`,
|
||||
renotify: true,
|
||||
requireInteraction: true
|
||||
};
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<!-- MODAL INMERSIVO: CÓDIGO QR PARA PRESENTAR EN LA SODA (DISEÑO SIBOPAY EXACTO) -->
|
||||
<div class="modal-qr-sibopay-immersive" id="modalQr" style="display: none;" onclick="closeQrModal(event)">
|
||||
<!-- FONDO SUPERIOR CELESTE CON LOGO Y MARCA SIBOPAY -->
|
||||
<div class="qr-immersive-bg-header">
|
||||
<div class="qr-immersive-brand-header">
|
||||
<div class="qr-immersive-brand-logo-wrap">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" class="qr-immersive-brand-logo">
|
||||
</div>
|
||||
<div class="qr-immersive-brand-title">
|
||||
<span>Sibo</span><strong class="brand-pay-text">Pay</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTENEDOR CENTRAL: TARJETA BLANCA Y BOTÓN CERRAR -->
|
||||
<div class="qr-immersive-content" onclick="event.stopPropagation()">
|
||||
<div class="qr-immersive-card">
|
||||
<div class="qr-card-header-title">MI CARNÉ SIBOPAY</div>
|
||||
|
||||
<!-- Banner especial cuando el lÃmite diario fue alcanzado pero tiene preórdenes -->
|
||||
<div id="qrPreorderOnlyBanner" style="display: none; background: #eff6ff; border: 1.5px solid #bfdbfe; color: #1e40af; border-radius: 10px; padding: 7px 10px; margin-bottom: 10px; font-size: 0.75rem; text-align: center; font-weight: 700; line-height: 1.35;">
|
||||
📦 Válido exclusivamente para retirar tu Pre-Orden en la soda.<br>
|
||||
<span style="font-size: 0.70rem; color: #3b82f6;">Compras nuevas en mostrador bloqueadas por lÃmite diario.</span>
|
||||
</div>
|
||||
|
||||
<div class="qr-scanner-frame-wrapper">
|
||||
<div class="qr-frame-corner top-left"></div>
|
||||
<div class="qr-frame-corner top-right"></div>
|
||||
<div class="qr-frame-corner bottom-left"></div>
|
||||
<div class="qr-frame-corner bottom-right"></div>
|
||||
|
||||
<img id="qrDisplayImg" class="qr-immersive-code-img" src="" alt="Código QR">
|
||||
|
||||
<!-- LOGO DE LA 'S' EN EL CENTRO DEL QR -->
|
||||
<div class="qr-center-logo-badge" title="SiboPay">
|
||||
<img src="/img/sibopay-emblem.png" alt="S" class="qr-center-logo-img">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="qr-card-token-text" id="qrTokenDisplay">
|
||||
CODIGO-QR
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BOTÓN CELESTE TIPO PÃLDORA -->
|
||||
<button type="button" onclick="closeQrModal()" class="qr-immersive-btn-close">
|
||||
Cerrar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,594 @@
|
||||
/* ==========================================================================
|
||||
BACKUP ORIGINAL: MODAL QR SIBOPAY (ESTILO ORIGINAL)
|
||||
========================================================================== */
|
||||
/* ==========================================================================
|
||||
MODAL QR INMERSIVO SIBOPAY (DISEÑO MÓVIL EXACTO A LA REFERENCIA)
|
||||
========================================================================== */
|
||||
.modal-qr-sibopay-immersive {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 9999;
|
||||
background: #f1f5f9;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: calc(16px + var(--safe-top)) 20px calc(24px + var(--safe-bottom)) 20px;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
animation: fadeIn 0.2s ease;
|
||||
}
|
||||
|
||||
body.dark-mode .modal-qr-sibopay-immersive {
|
||||
background: #0b1120;
|
||||
}
|
||||
|
||||
.qr-immersive-bg-header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 52%;
|
||||
min-height: 310px;
|
||||
background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
|
||||
border-bottom-left-radius: 36px;
|
||||
border-bottom-right-radius: 36px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
padding-top: calc(48px + var(--safe-top));
|
||||
box-sizing: border-box;
|
||||
z-index: 1;
|
||||
box-shadow: 0 8px 24px rgba(2, 132, 199, 0.25);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.qr-immersive-brand-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.qr-immersive-brand-logo-wrap {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 50%;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 4px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.qr-immersive-brand-logo {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
border-radius: 50%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.qr-immersive-brand-title {
|
||||
font-size: 2.15rem;
|
||||
font-weight: 900;
|
||||
letter-spacing: -0.6px;
|
||||
line-height: 1.1;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
|
||||
}
|
||||
|
||||
.qr-immersive-brand-title span {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.qr-immersive-brand-title .brand-pay-text {
|
||||
color: #38bdf8;
|
||||
font-weight: 900;
|
||||
margin-left: 1px;
|
||||
text-shadow: 0 2px 10px rgba(56, 189, 248, 0.5);
|
||||
}
|
||||
|
||||
.qr-immersive-content {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
max-width: 325px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 18px;
|
||||
margin-top: calc(152px + var(--safe-top));
|
||||
animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.qr-immersive-card {
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: 26px;
|
||||
padding: 24px 20px 22px 20px;
|
||||
text-align: center;
|
||||
box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
|
||||
border: 1px solid rgba(226, 232, 240, 0.9);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body.dark-mode .qr-immersive-card {
|
||||
background: #1e293b;
|
||||
border-color: #334155;
|
||||
box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.qr-card-header-title {
|
||||
font-size: 0.98rem;
|
||||
font-weight: 900;
|
||||
color: #1e293b;
|
||||
letter-spacing: 0.8px;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
body.dark-mode .qr-card-header-title {
|
||||
color: #f1f5f9;
|
||||
}
|
||||
|
||||
.qr-scanner-frame-wrapper {
|
||||
position: relative;
|
||||
width: 224px;
|
||||
height: 224px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.qr-frame-corner {
|
||||
position: absolute;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-color: #94a3b8;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
body.dark-mode .qr-frame-corner {
|
||||
border-color: #64748b;
|
||||
}
|
||||
|
||||
.qr-frame-corner.top-left {
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-width: 3.5px 0 0 3.5px;
|
||||
border-top-left-radius: 8px;
|
||||
}
|
||||
|
||||
.qr-frame-corner.top-right {
|
||||
top: 0;
|
||||
right: 0;
|
||||
border-width: 3.5px 3.5px 0 0;
|
||||
border-top-right-radius: 8px;
|
||||
}
|
||||
|
||||
.qr-frame-corner.bottom-left {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
border-width: 0 0 3.5px 3.5px;
|
||||
border-bottom-left-radius: 8px;
|
||||
}
|
||||
|
||||
.qr-frame-corner.bottom-right {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
border-width: 0 3.5px 3.5px 0;
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
|
||||
.qr-immersive-code-img {
|
||||
width: 196px;
|
||||
height: 196px;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
border-radius: 6px;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.qr-center-logo-badge {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
background: #ffffff;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 3px;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
|
||||
z-index: 10;
|
||||
border: 2.5px solid #ffffff;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.qr-center-logo-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
border-radius: 50%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.qr-card-token-text {
|
||||
margin-top: 18px;
|
||||
font-family: monospace;
|
||||
font-size: 0.92rem;
|
||||
font-weight: 800;
|
||||
color: #64748b;
|
||||
letter-spacing: 0.6px;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
body.dark-mode .qr-card-token-text {
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
.qr-immersive-btn-close {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
border-radius: 999px;
|
||||
background: #0284c7;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
font-size: 1.05rem;
|
||||
font-weight: 800;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 8px 20px rgba(2, 132, 199, 0.38);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
|
||||
.qr-immersive-btn-close:hover {
|
||||
background: #0369a1;
|
||||
box-shadow: 0 10px 24px rgba(2, 132, 199, 0.48);
|
||||
}
|
||||
|
||||
.qr-immersive-btn-close:active {
|
||||
transform: scale(0.98);
|
||||
|
||||
/* ==========================================================================
|
||||
BACKUP ORIGINAL: LOGIN SPLASH & BOTTOM SHEET (ESTILO ORIGINAL)
|
||||
========================================================================== */
|
||||
/* ==========================================================================
|
||||
VISTA DE LOGIN: WELCOME SPLASH & BOTTOM SHEET (ESTILO ORDER-EAT / SIBOPAY)
|
||||
========================================================================== */
|
||||
.splash-welcome-screen {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: linear-gradient(170deg, #0284c7 0%, #0369a1 100%);
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* Patrón de siluetas de alimentos difuminado (Marca de agua animada / Floating Watermark) */
|
||||
.splash-doodle-bg {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='130' height='130' viewBox='0 0 130 130' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' opacity='0.16'%3E%3Cpath d='M15 32 h28 a3 3 0 0 1 3 3 v12 a10 10 0 0 1 -10 10 h-14 a10 10 0 0 1 -10 -10 v-12 a3 3 0 0 1 3 -3 z'/%3E%3Cpath d='M24 26 c0 -3 10 -3 10 0'/%3E%3Cpath d='M9 37 h6'/%3E%3Cpath d='M46 37 h6'/%3E%3Cpath d='M92 26 c-6 -8 -16 0 -16 8 c0 10 12 18 16 20 c4 -2 16 -10 16 -20 c0 -8 -10 -16 -16 -8'/%3E%3Cpath d='M92 26 c0 -5 4 -7 7 -8'/%3E%3Cpath d='M20 102 c-4 -4 -3 -10 2 -12 c0 -6 8 -8 12 -4 c4 -6 14 -4 14 3 c4 2 5 8 1 12 c-2 2 -4 3 -7 3 h-15 c-3 0 -5 -1 -7 -2 z'/%3E%3Cpath d='M30 105 v12'/%3E%3Cpath d='M82 86 v24'/%3E%3Cpath d='M78 86 v8 c0 3 8 3 8 0 v-8'/%3E%3Cpath d='M82 94 v16'/%3E%3Cpath d='M98 86 c-3 0 -5 4 -5 9 c0 4 3 6 5 6 v17'/%3E%3Cpath d='M98 86 v32'/%3E%3Cellipse cx='60' cy='62' rx='13' ry='5'/%3E%3Cpath d='M49 62 c2 6 20 6 22 0'/%3E%3C/g%3E%3C/svg%3E");
|
||||
background-size: 130px 130px;
|
||||
background-repeat: repeat;
|
||||
animation: floatingDoodles 55s linear infinite;
|
||||
will-change: background-position;
|
||||
}
|
||||
|
||||
@keyframes floatingDoodles {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 520px -260px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.splash-doodle-bg {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
.splash-content-wrap {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 40px 24px calc(28px + env(safe-area-inset-bottom, 16px));
|
||||
max-width: 440px;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.splash-brand-hero {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.splash-emblem-wrap {
|
||||
width: 136px;
|
||||
height: 136px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.22);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
border: 3.5px solid rgba(255, 255, 255, 0.45);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 16px;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
|
||||
margin-bottom: 22px;
|
||||
animation: pulse 4s infinite ease-in-out;
|
||||
}
|
||||
|
||||
.splash-emblem-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.2));
|
||||
}
|
||||
|
||||
.splash-title {
|
||||
color: #ffffff;
|
||||
font-size: 3.1rem;
|
||||
font-weight: 900;
|
||||
letter-spacing: -1.2px;
|
||||
margin: 0;
|
||||
line-height: 1;
|
||||
text-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
|
||||
}
|
||||
|
||||
.splash-tagline {
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
margin: 10px 0 0 0;
|
||||
letter-spacing: 0.3px;
|
||||
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
|
||||
}
|
||||
|
||||
.splash-actions-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.splash-btn-primary {
|
||||
width: 100%;
|
||||
height: 54px;
|
||||
border-radius: 9999px;
|
||||
background: #ffffff;
|
||||
color: #0284c7;
|
||||
border: none;
|
||||
font-size: 1.05rem;
|
||||
font-weight: 900;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
|
||||
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
letter-spacing: 0.2px;
|
||||
}
|
||||
|
||||
.splash-btn-primary:active {
|
||||
transform: scale(0.97);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.splash-btn-secondary {
|
||||
width: 100%;
|
||||
height: 52px;
|
||||
border-radius: 9999px;
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
color: #ffffff;
|
||||
border: 2px solid rgba(255, 255, 255, 0.85);
|
||||
backdrop-filter: blur(6px);
|
||||
-webkit-backdrop-filter: blur(6px);
|
||||
font-size: 1.02rem;
|
||||
font-weight: 900;
|
||||
cursor: pointer;
|
||||
transition: transform 0.15s ease, background 0.15s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
letter-spacing: 0.2px;
|
||||
}
|
||||
|
||||
.splash-btn-secondary:active {
|
||||
transform: scale(0.97);
|
||||
background: rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
.splash-disclaimer {
|
||||
color: rgba(255, 255, 255, 0.88);
|
||||
font-size: 0.76rem;
|
||||
text-align: center;
|
||||
margin: 6px 0 0 0;
|
||||
line-height: 1.5;
|
||||
font-weight: 600;
|
||||
max-width: 380px;
|
||||
}
|
||||
|
||||
.splash-disclaimer a {
|
||||
color: #ffffff;
|
||||
font-weight: 900;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.splash-disclaimer a:hover {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
BOTTOM SHEET (VENTANA INFERIOR DESLIZABLE)
|
||||
========================================================================== */
|
||||
.bottom-sheet-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(15, 23, 42, 0.65);
|
||||
backdrop-filter: blur(5px);
|
||||
-webkit-backdrop-filter: blur(5px);
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.25s ease;
|
||||
}
|
||||
|
||||
.bottom-sheet-backdrop.open {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.bottom-sheet-card {
|
||||
width: 100%;
|
||||
max-width: 460px;
|
||||
background: #ffffff;
|
||||
border-top-left-radius: 28px;
|
||||
border-top-right-radius: 28px;
|
||||
padding: 14px 22px calc(24px + env(safe-area-inset-bottom, 12px));
|
||||
box-shadow: 0 -12px 45px rgba(0, 0, 0, 0.32);
|
||||
max-height: 90vh;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
transform: translateY(100%);
|
||||
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.bottom-sheet-backdrop.open .bottom-sheet-card {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.bottom-sheet-pill-handle {
|
||||
width: 44px;
|
||||
height: 5px;
|
||||
border-radius: 3px;
|
||||
background: #cbd5e1;
|
||||
margin: 0 auto 14px;
|
||||
}
|
||||
|
||||
.bottom-sheet-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
}
|
||||
|
||||
.bottom-sheet-close-btn {
|
||||
background: #f1f5f9;
|
||||
border: none;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
font-size: 1.1rem;
|
||||
color: #64748b;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
|
||||
.bottom-sheet-close-btn:hover {
|
||||
background: #e2e8f0;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
VISTA DE LOGIN CLÃSICA (COMPATIBILIDAD Y MEMORIA)
|
||||
========================================================================== */
|
||||
.login-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: radial-gradient(circle at 50% 10%, #0284c7 0%, #0f172a 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 16px;
|
||||
z-index: 9999;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.login-card {
|
||||
background: var(--card-bg, #ffffff);
|
||||
color: var(--text-main, #0f172a);
|
||||
border-radius: 24px;
|
||||
padding: 28px 24px;
|
||||
width: 100%;
|
||||
max-width: 420px;
|
||||
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
animation: fadeIn 0.25s ease-out;
|
||||
}
|
||||
|
||||
.login-brand {
|
||||
text-align: center;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
font-size: 3rem;
|
||||
display: inline-block;
|
||||
background: #e0f2fe;
|
||||
padding: 12px;
|
||||
border-radius: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.login-title {
|
||||
font-size: 1.6rem;
|
||||
font-weight: 900;
|
||||
letter-spacing: -0.5px;
|
||||
color: #0f172a;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.login-subtitle {
|
||||
font-size: 0.8rem;
|
||||
color: #64748b;
|
||||
margin-top: 4px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.login-form-group {
|
||||
margin-bottom: 14px;
|
||||
@@ -0,0 +1,158 @@
|
||||
<!-- VISTA DE LOGIN: WELCOME SPLASH SCREEN & BOTTOM SHEET (ESTILO ORDER-EAT / SIBOPAY) -->
|
||||
<div id="viewLogin" class="splash-welcome-screen" style="display: none;">
|
||||
<!-- Patrón de alimentos en marca de agua difuminada -->
|
||||
<div class="splash-doodle-bg"></div>
|
||||
|
||||
<!-- Contenido principal centrado -->
|
||||
<div class="splash-content-wrap">
|
||||
<!-- Sección superior/media: Emblema y Marca -->
|
||||
<div class="splash-brand-hero">
|
||||
<div class="splash-emblem-wrap">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" class="splash-emblem-img">
|
||||
</div>
|
||||
<h1 class="splash-title">SiboPay</h1>
|
||||
<p class="splash-tagline">Sistema Digital de Pagos y Monedero Estudiantil</p>
|
||||
</div>
|
||||
|
||||
<!-- Sección inferior: Botones de acción y Disclaimer -->
|
||||
<div class="splash-actions-box">
|
||||
<button type="button" class="splash-btn-primary" onclick="openLoginSheet('login')">
|
||||
Iniciar Sesión
|
||||
</button>
|
||||
|
||||
<button type="button" class="splash-btn-secondary" onclick="openLoginSheet('register')">
|
||||
Registrarse
|
||||
</button>
|
||||
|
||||
<p class="splash-disclaimer">
|
||||
Al iniciar sesión y registrarse, acepta nuestros
|
||||
<a href="/terminos" target="_blank" rel="noopener noreferrer">Términos y Condiciones</a>
|
||||
y nuestra
|
||||
<a href="/privacidad" target="_blank" rel="noopener noreferrer">PolÃtica de Privacidad</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BOTTOM SHEET: VENTANA INFERIOR DESLIZABLE PARA LOGIN Y REGISTRO -->
|
||||
<div id="loginBottomSheet" class="bottom-sheet-backdrop" onclick="closeLoginSheet(event)">
|
||||
<div class="bottom-sheet-card" onclick="event.stopPropagation()">
|
||||
<div class="bottom-sheet-pill-handle"></div>
|
||||
|
||||
<div class="bottom-sheet-header">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" style="width: 24px; height: 24px; object-fit: contain;">
|
||||
<h3 id="bottomSheetTitle" style="margin: 0; font-size: 1.22rem; font-weight: 800; color: #0f172a;">Iniciar Sesión</h3>
|
||||
</div>
|
||||
<button type="button" class="bottom-sheet-close-btn" onclick="closeLoginSheet()" title="Cerrar">✕</button>
|
||||
</div>
|
||||
|
||||
<!-- CONTENIDO 1: INICIAR SESIÓN -->
|
||||
<div id="sheetContentLogin">
|
||||
<form id="formLogin" onsubmit="handleLoginSubmit(event)">
|
||||
<div class="login-form-group">
|
||||
<label id="lblLoginUser" for="loginUsername">Usuario, Teléfono o Carné:</label>
|
||||
<input type="text" id="loginUsername" class="login-input" placeholder="Ej: padre, carlos_papa, 8888-1122 o mateo" required autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label id="lblLoginPass" for="loginPassword">Contraseña o PIN:</label>
|
||||
<input type="password" id="loginPassword" class="login-input" placeholder="••••••••" required autocomplete="current-password">
|
||||
</div>
|
||||
|
||||
<div id="loginErrorMsg" style="display: none; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; padding: 9px 12px; border-radius: 10px; font-size: 0.82rem; font-weight: 700; margin-bottom: 12px; text-align: center;"></div>
|
||||
|
||||
<button type="submit" id="btnLoginSubmit" class="login-submit-btn" style="display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; border-radius: 12px; font-weight: 800; font-size: 1rem; background: linear-gradient(135deg, #0284c7, #0369a1); color: white; border: none; cursor: pointer; box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/></svg>
|
||||
<span id="lblBtnLoginText">Ingresar al Sistema</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div style="text-align: center; margin-top: 14px;">
|
||||
<p style="font-size: 0.82rem; color: #64748b; margin: 0;">
|
||||
¿Aún no tienes cuenta?
|
||||
<button type="button" onclick="switchSheetView('register')" style="background: none; border: none; color: #0284c7; font-weight: 800; cursor: pointer; text-decoration: underline; font-size: 0.82rem; padding: 0;">RegÃstrate como Padre aquÃ</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- ACCESOS RÃPIDOS DE PRUEBA DESPLEGABLES (DEMO) -->
|
||||
<details style="margin-top: 16px; border-top: 1px solid #f1f5f9; padding-top: 12px;">
|
||||
<summary style="font-size: 0.76rem; font-weight: 800; color: #64748b; cursor: pointer; text-align: center; outline: none;">
|
||||
⚡ Accesos rápidos de prueba (Demo 1-Click)
|
||||
</summary>
|
||||
<div class="login-demo-btns" style="margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;">
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('dev', 'dev123')" style="border: 1.5px solid #0284c7; background: #f0f9ff; padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span style="color: #0284c7; font-weight: 800;">Developer</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('admin', 'admin123')" style="padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span>Admin Soda</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('cajero', 'cajero123')" style="padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span>Cajero</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('padre', 'padre123')" style="padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span>Padre Demo</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('mateo', '1234')" style="padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span>Mateo (2°)</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('sofia', '1234')" style="padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span>SofÃa (3°)</span>
|
||||
</button>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<!-- CONTENIDO 2: REGISTRO DE PADRES -->
|
||||
<div id="sheetContentRegister" style="display: none;">
|
||||
<div style="background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); border: 1.5px solid #bae6fd; border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px;">
|
||||
<div style="width: 36px; height: 36px; border-radius: 10px; background: white; border: 1px solid #bae6fd; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 4px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" style="width: 100%; height: 100%; object-fit: contain;">
|
||||
</div>
|
||||
<div>
|
||||
<strong style="color: #0369a1; font-size: 0.86rem; display: block; font-weight: 800;">Registro de Padres o Encargados</strong>
|
||||
<span style="font-size: 0.72rem; color: #475569; display: block;">Crea tu cuenta para vincular a tus hijos y recargarles saldo con SINPE móvil.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="formRegisterPadre" onsubmit="handleRegisterPadreSubmit(event)">
|
||||
<div class="login-form-group">
|
||||
<label for="regNombre">Nombre y Apellidos:</label>
|
||||
<input type="text" id="regNombre" class="login-input" placeholder="Ej: Carlos Alvarado Castro" required autocomplete="name">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regTelefono">Teléfono o Celular (para SINPE):</label>
|
||||
<input type="tel" id="regTelefono" class="login-input" placeholder="Ej: 8888-1122" required autocomplete="tel">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regEmail">Correo Electrónico <span style="font-size: 0.72rem; color: #64748b;">(Opcional)</span>:</label>
|
||||
<input type="email" id="regEmail" class="login-input" placeholder="Ej: [email protected]" autocomplete="email">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regUsername">Nombre de Usuario:</label>
|
||||
<input type="text" id="regUsername" class="login-input" placeholder="Ej: carlos_papa" required autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regPassword">Contraseña:</label>
|
||||
<input type="password" id="regPassword" class="login-input" placeholder="MÃnimo 4 caracteres" required autocomplete="new-password">
|
||||
</div>
|
||||
|
||||
<div id="registerErrorMsg" style="display: none; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; padding: 8px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; margin-bottom: 12px; text-align: center;"></div>
|
||||
|
||||
<button type="submit" id="btnRegisterSubmit" class="login-submit-btn" style="display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; border-radius: 12px; font-weight: 800; font-size: 1rem; background: linear-gradient(135deg, #0284c7, #0369a1); color: white; border: none; cursor: pointer; box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="7" r="3.5"/><path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/><circle cx="17.5" cy="7.5" r="2.5"/><path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/></svg>
|
||||
<span>Crear Cuenta de Padre y Entrar</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div style="text-align: center; margin-top: 14px;">
|
||||
<p style="font-size: 0.82rem; color: #64748b; margin: 0;">
|
||||
¿Ya tienes cuenta registrada?
|
||||
<button type="button" onclick="switchSheetView('login')" style="background: none; border: none; color: #0284c7; font-weight: 800; cursor: pointer; text-decoration: underline; font-size: 0.82rem; padding: 0;">Inicia sesión aquÃ</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,52 @@
|
||||
<!-- ========================================================================== -->
|
||||
<!-- MODAL INMERSIVO QR: DISEÑO GLASSMORPHISM INMERSIVO (FROSTED GLASS & GLOW) -->
|
||||
<!-- NOTA DE ROLLBACK: Respaldo original en public/templates/backup-modalQr-original.html -->
|
||||
<!-- ========================================================================== -->
|
||||
<div class="modal-qr-sibopay-immersive glassmorphic-qr-modal" id="modalQr" style="display: none;" onclick="closeQrModal(event)">
|
||||
<!-- FONDO SUPERIOR CON LOGO Y MARCA SIBOPAY -->
|
||||
<div class="qr-immersive-bg-header glassmorphic-qr-header">
|
||||
<div class="qr-immersive-brand-header">
|
||||
<div class="qr-immersive-brand-logo-wrap glassmorphic-brand-logo">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" class="qr-immersive-brand-logo">
|
||||
</div>
|
||||
<div class="qr-immersive-brand-title">
|
||||
<span>Sibo</span><strong class="brand-pay-text">Pay</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTENEDOR CENTRAL: TARJETA DE CRISTAL ESMERILADO Y BOTÓN CERRAR -->
|
||||
<div class="qr-immersive-content" onclick="event.stopPropagation()">
|
||||
<div class="qr-immersive-card glassmorphic-qr-card">
|
||||
<div class="qr-card-header-title glassmorphic-title-badge">MI CARNÉ SIBOPAY</div>
|
||||
|
||||
<!-- Banner especial cuando el lÃmite diario fue alcanzado pero tiene preórdenes -->
|
||||
<div id="qrPreorderOnlyBanner" style="display: none; background: rgba(59, 130, 246, 0.15); border: 1.5px solid rgba(147, 197, 253, 0.4); color: #e0f2fe; border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; font-size: 0.75rem; text-align: center; font-weight: 700; line-height: 1.35; backdrop-filter: blur(8px);">
|
||||
📦 Válido exclusivamente para retirar tu Pre-Orden en la soda.<br>
|
||||
<span style="font-size: 0.70rem; color: #93c5fd;">Compras nuevas en mostrador bloqueadas por lÃmite diario.</span>
|
||||
</div>
|
||||
|
||||
<div class="qr-scanner-frame-wrapper glassmorphic-qr-frame">
|
||||
<div class="qr-frame-corner top-left"></div>
|
||||
<div class="qr-frame-corner top-right"></div>
|
||||
<div class="qr-frame-corner bottom-left"></div>
|
||||
<div class="qr-frame-corner bottom-right"></div>
|
||||
|
||||
<img id="qrDisplayImg" class="qr-immersive-code-img" src="" alt="Código QR">
|
||||
|
||||
<!-- LOGO DE LA 'S' EN EL CENTRO DEL QR -->
|
||||
<div class="qr-center-logo-badge" title="SiboPay">
|
||||
<img src="/img/sibopay-emblem.png" alt="S" class="qr-center-logo-img">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="qr-card-token-text glassmorphic-token-pill" id="qrTokenDisplay">
|
||||
CODIGO-QR
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BOTÓN TIPO PÃLDORA DE CRISTAL -->
|
||||
<button type="button" onclick="closeQrModal()" class="qr-immersive-btn-close glassmorphic-btn-pill">
|
||||
Cerrar
|
||||
</button>
|
||||
</div>
|
||||
@@ -0,0 +1,163 @@
|
||||
<!-- ========================================================================== -->
|
||||
<!-- VISTA DE LOGIN: DISEÑO GLASSMORPHISM INMERSIVO (FROSTED GLASS & SPECULAR GLOW) -->
|
||||
<!-- NOTA DE ROLLBACK: Respaldo original en public/templates/backup-viewLogin-original.html -->
|
||||
<!-- ========================================================================== -->
|
||||
<div id="viewLogin" class="splash-welcome-screen glassmorphic-welcome-screen" style="display: none;">
|
||||
<!-- Patrón de alimentos en marca de agua difuminada -->
|
||||
<div class="splash-doodle-bg"></div>
|
||||
|
||||
<!-- Contenido principal centrado -->
|
||||
<div class="splash-content-wrap">
|
||||
<!-- Sección superior/media: Emblema y Marca -->
|
||||
<div class="splash-brand-hero">
|
||||
<div class="splash-emblem-wrap">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" class="splash-emblem-img">
|
||||
</div>
|
||||
<h1 class="splash-title">SiboPay</h1>
|
||||
<p class="splash-tagline">Sistema Digital de Pagos y Monedero Estudiantil</p>
|
||||
</div>
|
||||
|
||||
<!-- Sección inferior: Botones de acción y Disclaimer -->
|
||||
<div class="splash-actions-box">
|
||||
<button type="button" class="splash-btn-primary glassmorphic-btn-splash-primary" onclick="openLoginSheet('login')">
|
||||
Iniciar Sesión
|
||||
</button>
|
||||
|
||||
<button type="button" class="splash-btn-secondary glassmorphic-btn-splash-secondary" onclick="openLoginSheet('register')">
|
||||
Registrarse
|
||||
</button>
|
||||
|
||||
<p class="splash-disclaimer">
|
||||
Al iniciar sesión y registrarse, acepta nuestros
|
||||
<a href="/terminos" target="_blank" rel="noopener noreferrer">Términos y Condiciones</a>
|
||||
y nuestra
|
||||
<a href="/privacidad" target="_blank" rel="noopener noreferrer">PolÃtica de Privacidad</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BOTTOM SHEET: VENTANA INFERIOR DESLIZABLE PARA LOGIN Y REGISTRO -->
|
||||
<div id="loginBottomSheet" class="bottom-sheet-backdrop" onclick="closeLoginSheet(event)">
|
||||
<div class="bottom-sheet-card glassmorphic-login-card" onclick="event.stopPropagation()">
|
||||
<div class="bottom-sheet-pill-handle"></div>
|
||||
|
||||
<div class="bottom-sheet-header">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" style="width: 24px; height: 24px; object-fit: contain;">
|
||||
<h3 id="bottomSheetTitle" style="margin: 0; font-size: 1.22rem; font-weight: 800; color: #0f172a;">Iniciar Sesión</h3>
|
||||
</div>
|
||||
<button type="button" class="bottom-sheet-close-btn" onclick="closeLoginSheet()" title="Cerrar">✕</button>
|
||||
</div>
|
||||
|
||||
<!-- CONTENIDO 1: INICIAR SESIÓN -->
|
||||
<div id="sheetContentLogin">
|
||||
<form id="formLogin" onsubmit="handleLoginSubmit(event)">
|
||||
<div class="login-form-group">
|
||||
<label id="lblLoginUser" for="loginUsername">Usuario, Teléfono o Carné:</label>
|
||||
<input type="text" id="loginUsername" class="login-input" placeholder="Ej: padre, carlos_papa, 8888-1122 o mateo" required autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label id="lblLoginPass" for="loginPassword">Contraseña o PIN:</label>
|
||||
<input type="password" id="loginPassword" class="login-input" placeholder="••••••••" required autocomplete="current-password">
|
||||
</div>
|
||||
|
||||
<div id="loginErrorMsg" style="display: none; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; padding: 9px 12px; border-radius: 10px; font-size: 0.82rem; font-weight: 700; margin-bottom: 12px; text-align: center;"></div>
|
||||
|
||||
<button type="submit" id="btnLoginSubmit" class="login-submit-btn" style="display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; border-radius: 12px; font-weight: 800; font-size: 1rem; background: linear-gradient(135deg, #0284c7, #0369a1); color: white; border: none; cursor: pointer; box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/></svg>
|
||||
<span id="lblBtnLoginText">Ingresar al Sistema</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div style="text-align: center; margin-top: 14px;">
|
||||
<p style="font-size: 0.82rem; color: #64748b; margin: 0;">
|
||||
¿Aún no tienes cuenta?
|
||||
<button type="button" onclick="switchSheetView('register')" style="background: none; border: none; color: #0284c7; font-weight: 800; cursor: pointer; text-decoration: underline; font-size: 0.82rem; padding: 0;">RegÃstrate como Padre aquÃ</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- ACCESOS RÃPIDOS DE PRUEBA DESPLEGABLES (DEMO) -->
|
||||
<details style="margin-top: 16px; border-top: 1px solid #f1f5f9; padding-top: 12px;">
|
||||
<summary style="font-size: 0.76rem; font-weight: 800; color: #64748b; cursor: pointer; text-align: center; outline: none;">
|
||||
⚡ Accesos rápidos de prueba (Demo 1-Click)
|
||||
</summary>
|
||||
<div class="login-demo-btns" style="margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;">
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('dev', 'dev123')" style="border: 1.5px solid #0284c7; background: #f0f9ff; padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span style="color: #0284c7; font-weight: 800;">Developer</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('admin', 'admin123')" style="padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span>Admin Soda</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('cajero', 'cajero123')" style="padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span>Cajero</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('padre', 'padre123')" style="padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span>Padre Demo</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('mateo', '1234')" style="padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span>Mateo (2°)</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('sofia', '1234')" style="padding: 6px 4px; font-size: 0.72rem;">
|
||||
<span>SofÃa (3°)</span>
|
||||
</button>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<!-- CONTENIDO 2: REGISTRO DE PADRES -->
|
||||
<div id="sheetContentRegister" style="display: none;">
|
||||
<div class="login-register-banner" style="background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.06) 100%); border: 1.5px solid rgba(255,255,255,0.25); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px;">
|
||||
<div style="width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.4); display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 4px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" style="width: 100%; height: 100%; object-fit: contain;">
|
||||
</div>
|
||||
<div>
|
||||
<strong style="color: #38bdf8; font-size: 0.86rem; display: block; font-weight: 800;">Registro de Padres o Encargados</strong>
|
||||
<span style="font-size: 0.72rem; color: rgba(255,255,255,0.85); display: block;">Crea tu cuenta para vincular a tus hijos y recargarles saldo con SINPE móvil.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="formRegisterPadre" onsubmit="handleRegisterPadreSubmit(event)">
|
||||
<div class="login-form-group">
|
||||
<label for="regNombre">Nombre y Apellidos:</label>
|
||||
<input type="text" id="regNombre" class="login-input" placeholder="Ej: Carlos Alvarado Castro" required autocomplete="name">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regTelefono">Teléfono o Celular (para SINPE):</label>
|
||||
<input type="tel" id="regTelefono" class="login-input" placeholder="Ej: 8888-1122" required autocomplete="tel">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regEmail">Correo Electrónico <span style="font-size: 0.72rem; color: #64748b;">(Opcional)</span>:</label>
|
||||
<input type="email" id="regEmail" class="login-input" placeholder="Ej: [email protected]" autocomplete="email">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regUsername">Nombre de Usuario:</label>
|
||||
<input type="text" id="regUsername" class="login-input" placeholder="Ej: carlos_papa" required autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regPassword">Contraseña:</label>
|
||||
<input type="password" id="regPassword" class="login-input" placeholder="MÃnimo 4 caracteres" required autocomplete="new-password">
|
||||
</div>
|
||||
|
||||
<div id="registerErrorMsg" style="display: none; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; padding: 8px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; margin-bottom: 12px; text-align: center;"></div>
|
||||
|
||||
<button type="submit" id="btnRegisterSubmit" class="login-submit-btn" style="display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; border-radius: 12px; font-weight: 800; font-size: 1rem; background: linear-gradient(135deg, #0284c7, #0369a1); color: white; border: none; cursor: pointer; box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="7" r="3.5"/><path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/><circle cx="17.5" cy="7.5" r="2.5"/><path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/></svg>
|
||||
<span>Crear Cuenta de Padre y Entrar</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div style="text-align: center; margin-top: 14px;">
|
||||
<p style="font-size: 0.82rem; color: #64748b; margin: 0;">
|
||||
¿Ya tienes cuenta registrada?
|
||||
<button type="button" onclick="switchSheetView('login')" style="background: none; border: none; color: #0284c7; font-weight: 800; cursor: pointer; text-decoration: underline; font-size: 0.82rem; padding: 0;">Inicia sesión aquÃ</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
<!-- ==========================================================================
|
||||
PLANTILLA DE RESPALDO: DISEÑO DE LOGIN CLÁSICO CON ROLES (PADRE / ESTUDIANTE / PERSONAL)
|
||||
Guardado: 07-Oct-2026
|
||||
Para reactivar este diseño en el futuro, copia este bloque en #viewLogin dentro de public/index.html
|
||||
========================================================================== -->
|
||||
|
||||
<div id="viewLoginClassicCard" class="login-card">
|
||||
<div class="login-brand">
|
||||
<div class="login-logo" style="margin-bottom: 6px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay Logo" style="width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(2, 132, 199, 0.3)); display: inline-block;">
|
||||
</div>
|
||||
<h1 class="login-title" style="margin: 0; font-size: 1.85rem; font-weight: 900; letter-spacing: -0.5px;">Sibo<strong style="color: #0284c7;">Pay</strong></h1>
|
||||
<p class="login-subtitle">Sistema Digital de Pagos y Monedero Estudiantil</p>
|
||||
</div>
|
||||
|
||||
<!-- SELECTOR ENTRE INICIO DE SESIÓN Y REGISTRO -->
|
||||
<div class="login-tabs">
|
||||
<button type="button" class="login-tab-btn active" id="tabBtnLogin" onclick="switchLoginTab('login')" style="display: inline-flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/></svg>
|
||||
<span>Iniciar Sesión</span>
|
||||
</button>
|
||||
<button type="button" class="login-tab-btn" id="tabBtnRegister" onclick="switchLoginTab('register')" style="display: inline-flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="7" r="3.5"/><path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/><circle cx="17.5" cy="7.5" r="2.5"/><path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/></svg>
|
||||
<span>Registro de Padres</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- FORMULARIO 1: INICIAR SESIÓN CON SELECTOR DE ROL -->
|
||||
<form id="formLogin" onsubmit="handleLoginSubmit(event)">
|
||||
<div class="login-role-selector-wrap">
|
||||
<label style="font-size: 0.74rem; font-weight: 900; color: #475569; text-transform: uppercase; letter-spacing: 0.6px; display: block; margin-bottom: 8px;">¿Quién eres?</label>
|
||||
<div class="login-role-grid">
|
||||
<div onclick="selectLoginRole('padre')" id="loginRoleCardPadre" class="login-role-card selected">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="9" cy="7" r="3.5"/>
|
||||
<path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/>
|
||||
<circle cx="17.5" cy="7.5" r="2.5"/>
|
||||
<path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Padre</span>
|
||||
<span class="login-role-desc">o Encargado</span>
|
||||
</div>
|
||||
|
||||
<div onclick="selectLoginRole('estudiante')" id="loginRoleCardEstudiante" class="login-role-card">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1-2.5-2.5Z"/>
|
||||
<path d="M6 6h10"/>
|
||||
<path d="M6 10h10"/>
|
||||
<circle cx="12" cy="15" r="2"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Estudiante</span>
|
||||
<span class="login-role-desc">Carné QR</span>
|
||||
</div>
|
||||
|
||||
<div onclick="selectLoginRole('personal')" id="loginRoleCardPersonal" class="login-role-card">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M6 13.8V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v9.8"/>
|
||||
<path d="M4 13.8h16a1 1 0 0 1 1 1V20a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5.2a1 1 0 0 1 1-1Z"/>
|
||||
<line x1="10" y1="18" x2="14" y2="18"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Personal</span>
|
||||
<span class="login-role-desc">Soda / Caja</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label id="lblLoginUser" for="loginUsername">Usuario o Teléfono del Padre:</label>
|
||||
<input type="text" id="loginUsername" class="login-input" placeholder="Ej: padre, carlos_papa o 8888-1122" required autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label id="lblLoginPass" for="loginPassword">Contraseña:</label>
|
||||
<input type="password" id="loginPassword" class="login-input" placeholder="••••••••" required autocomplete="current-password">
|
||||
</div>
|
||||
|
||||
<div id="loginErrorMsg" style="display: none; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; padding: 8px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; margin-bottom: 12px; text-align: center;"></div>
|
||||
|
||||
<button type="submit" id="btnLoginSubmit" class="login-submit-btn" style="display: flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/></svg>
|
||||
<span id="lblBtnLoginText">Ingresar como Padre / Encargado</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!-- FORMULARIO 2: REGISTRO DE NUEVOS PADRES -->
|
||||
<form id="formRegisterPadre" onsubmit="handleRegisterPadreSubmit(event)" style="display: none;">
|
||||
<div style="background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); border: 1.5px solid #bae6fd; border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);">
|
||||
<div style="width: 44px; height: 44px; border-radius: 12px; background: white; border: 1.5px solid #bae6fd; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12); padding: 5px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" style="width: 100%; height: 100%; object-fit: contain;">
|
||||
</div>
|
||||
<div>
|
||||
<strong style="color: #0369a1; font-size: 0.92rem; display: block; font-weight: 800; letter-spacing: -0.2px;">Registro de Padres o Encargados</strong>
|
||||
<span style="font-size: 0.74rem; color: #475569; line-height: 1.35; display: block; margin-top: 2px;">Crea tu cuenta oficial en SiboPay para vincular a tus hijos y recargarles saldo escolar.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regNombre">Nombre y Apellidos:</label>
|
||||
<input type="text" id="regNombre" class="login-input" placeholder="Ej: Carlos Alvarado Castro" required autocomplete="name">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regTelefono">Teléfono o Celular (para SINPE):</label>
|
||||
<input type="tel" id="regTelefono" class="login-input" placeholder="Ej: 8888-1122" required autocomplete="tel">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regEmail">Correo Electrónico <span style="font-size: 0.75rem; font-weight: 600; color: #64748b;">(Opcional)</span>:</label>
|
||||
<input type="email" id="regEmail" class="login-input" placeholder="Ej: [email protected]" autocomplete="email">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regUsername">Nombre de Usuario:</label>
|
||||
<input type="text" id="regUsername" class="login-input" placeholder="Ej: carlos_papa" required autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regPassword">Contraseña:</label>
|
||||
<input type="password" id="regPassword" class="login-input" placeholder="Mínimo 4 caracteres" required autocomplete="new-password">
|
||||
</div>
|
||||
|
||||
<div id="registerErrorMsg" style="display: none; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; padding: 8px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; margin-bottom: 12px; text-align: center;"></div>
|
||||
|
||||
<button type="submit" id="btnRegisterSubmit" class="login-submit-btn" style="display: flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="7" r="3.5"/><path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/><circle cx="17.5" cy="7.5" r="2.5"/><path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/></svg>
|
||||
<span>Crear Cuenta de Padre y Entrar</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!-- ACCESOS RÁPIDOS DE PRUEBA (1-CLICK DEMO) -->
|
||||
<div class="login-demo-box">
|
||||
<div class="login-demo-title">Accesos Rápidos de Prueba:</div>
|
||||
<div class="login-demo-btns">
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('dev', 'dev123')" style="border: 1.5px solid #0284c7; background: #f0f9ff;">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#0284c7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>
|
||||
<span style="color: #0284c7; font-weight: 800;">Developer</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('admin', 'admin123')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<span>Admin Soda</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('cajero', 'cajero123')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="5" rx="2"/><line x1="2" x2="22" y1="10" y2="10"/></svg>
|
||||
<span>Cajero</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('padre', 'padre123')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
|
||||
<span>Padre</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('mateo', '1234')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>Mateo (2°)</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('sofia', '1234')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>Sofía (3°)</span>
|
||||
</button>
|
||||
</div>
|
||||
<div style="text-align: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid #f1f5f9;">
|
||||
<a href="/" style="display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 800; color: #0284c7; text-decoration: none; padding: 6px 14px; border-radius: 9999px; background: #e0f2fe; transition: all 0.2s;">
|
||||
<span>🌐 Ver Presentación Web de SiboPay ↗</span>
|
||||
</a>
|
||||
<p style="font-size: 0.72rem; color: #64748b; margin-top: 14px; line-height: 1.45;">
|
||||
Al iniciar sesión o registrarte, aceptas nuestros
|
||||
<a href="/terminos" target="_blank" style="color: #0284c7; font-weight: 700; text-decoration: underline;">Términos y Condiciones</a>
|
||||
y nuestra
|
||||
<a href="/privacidad" target="_blank" style="color: #0284c7; font-weight: 700; text-decoration: underline;">Política de Privacidad</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,57 @@
|
||||
# Catálogo de Pantallas de Inicio de Sesión de SiboPay
|
||||
|
||||
Este documento actúa como la **memoria y registro de versiones** de pantallas de inicio de sesión de SiboPay. Cada diseño está preservado en código para que pueda ser reactivado cuando el administrador o el usuario lo solicite.
|
||||
|
||||
---
|
||||
|
||||
## 🎨 Opción 1: Clásico con Selector de Roles (Padre, Estudiante, Personal)
|
||||
- **Archivo de Respaldo:** public/templates/login-classic-roles.html
|
||||
- **Estilo:** Tarjeta flotante central sobre fondo neutro con efecto blur.
|
||||
- **Características:**
|
||||
- Selector de pestaña superior: "Iniciar Sesión" y "Registro de Padres".
|
||||
- Selector visual interactivo "¿Quién eres?":
|
||||
- **Padre o Encargado** (ícono de familia)
|
||||
- **Estudiante Carné QR** (ícono de libreta/carné)
|
||||
- **Personal Soda / Caja** (ícono de local de comida/caja)
|
||||
- Formularios dinámicos que cambian placeholders y etiquetas según el rol seleccionado.
|
||||
- Accesos rápidos demo de 1-clic integrados en la tarjeta.
|
||||
- **Cómo restaurarlo:**
|
||||
Reemplazar el contenido de <div id="viewLogin"> en public/index.html con el código almacenado en public/templates/login-classic-roles.html.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Opción 2: Minimalista Splash & Bottom Sheet (Estilo OrderEAT / SiboPay) [ACTUAL EN PRODUCCIÓN]
|
||||
- **Archivo de Implementación:** public/index.html (dentro de #viewLogin)
|
||||
- **Estilo:** Pantalla completa en degradado celeste oficial (#0284c7 a #0369a1) con marca de agua difuminada de siluetas de comida (ollas, brócoli, manzanas, cubiertos).
|
||||
- **Características:**
|
||||
- Emblema central de SiboPay con aura translúcida y título blanco de alta legibilidad.
|
||||
- Eslogan institucional "Sistema Digital de Pagos y Monedero Estudiantil".
|
||||
- Botón principal tipo píldora blanca sólida: **"Iniciar Sesión"**.
|
||||
- Botón secundario translúcido con borde blanco: **"Registrarse"**.
|
||||
- Al pie absoluto de la pantalla: Enlace a **Términos y Condiciones** que abre un modal emergente rápido.
|
||||
- **Interacción fluida (Bottom Sheet):** Al presionar Iniciar Sesión o Registrarse, se despliega suavemente desde abajo una ventana moderna con los formularios, sin tapar abruptamente la identidad visual de la aplicación.
|
||||
- El sistema detecta el rol automáticamente al validar credenciales contra /api/auth/login.
|
||||
|
||||
---
|
||||
|
||||
## 💎 Opción 3: Glassmorphism Inmersivo (Diseño Frosted Glass & Specular Glow) [PLANTILLA ARCHIVADA]
|
||||
- **Archivos de Plantilla Archivados:**
|
||||
- public/templates/design-glassmorphic-viewLogin.html
|
||||
- public/templates/design-glassmorphic-modalQr.html
|
||||
- public/templates/backup-styles-login-qr-original.css
|
||||
- **Estilo:** Vidrio esmerilado translúcido (*frosted glass*) sobre fondo de gradiente profundo, reflejos especulares de 1px en los bordes, cápsulas flotantes y tipografía en blanco puro brillante (#ffffff).
|
||||
- **Características:**
|
||||
1. **Tarjeta de Inicio de Sesión y Registro (#viewLogin & #loginBottomSheet):**
|
||||
- Ventana y tarjeta con efecto de cristal esmerilado (ackdrop-filter: blur(28px)).
|
||||
- Campos de texto (inputs) en cápsulas translúcidas con bordes de luz blanca.
|
||||
- Botones principales y de accesos rápidos con brillo y sombra de cristal.
|
||||
2. **Modal Inmersivo del Código QR de Pago (#modalQr):**
|
||||
- Tarjeta central de cristal esmerilado con biseles luminosos.
|
||||
- Marco de escaneo QR de alto contraste para lectura instantánea de cámara.
|
||||
- Botón de cierre en cápsula de vidrio flotante.
|
||||
- **Cómo reactivarlo:**
|
||||
Reemplazar el contenido de #viewLogin o #modalQr con las plantillas en public/templates/design-glassmorphic-*.html.
|
||||
|
||||
---
|
||||
|
||||
*Última actualización de registro: 08 de Octubre de 2026*
|
||||
@@ -0,0 +1,167 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SiboPay - Inicio de Sesión Clásico con Roles</title>
|
||||
<link rel="icon" type="image/png" href="/img/sibopay-emblem.png">
|
||||
<link rel="stylesheet" href="/css/styles.css">
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
|
||||
background: radial-gradient(circle at 50% 10%, #0284c7 0%, #0f172a 100%);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.login-overlay {
|
||||
position: relative !important;
|
||||
background: none !important;
|
||||
padding: 20px !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="login-overlay">
|
||||
<div id="viewLoginClassicCard" class="login-card">
|
||||
<div class="login-brand">
|
||||
<div class="login-logo" style="margin-bottom: 6px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay Logo" style="width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(2, 132, 199, 0.3)); display: inline-block;">
|
||||
</div>
|
||||
<h1 class="login-title" style="margin: 0; font-size: 1.85rem; font-weight: 900; letter-spacing: -0.5px;">Sibo<strong style="color: #0284c7;">Pay</strong></h1>
|
||||
<p class="login-subtitle">Sistema Digital de Pagos y Monedero Estudiantil</p>
|
||||
</div>
|
||||
|
||||
<!-- SELECTOR ENTRE INICIO DE SESIÓN Y REGISTRO -->
|
||||
<div class="login-tabs">
|
||||
<button type="button" class="login-tab-btn active" id="tabBtnLogin" onclick="switchLoginTab('login')" style="display: inline-flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/></svg>
|
||||
<span>Iniciar Sesión</span>
|
||||
</button>
|
||||
<button type="button" class="login-tab-btn" id="tabBtnRegister" onclick="switchLoginTab('register')" style="display: inline-flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="7" r="3.5"/><path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/><circle cx="17.5" cy="7.5" r="2.5"/><path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/></svg>
|
||||
<span>Registro de Padres</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- FORMULARIO 1: INICIAR SESIÓN CON SELECTOR DE ROL -->
|
||||
<form id="formLogin" onsubmit="event.preventDefault()">
|
||||
<div class="login-role-selector-wrap">
|
||||
<label style="font-size: 0.74rem; font-weight: 900; color: #475569; text-transform: uppercase; letter-spacing: 0.6px; display: block; margin-bottom: 8px;">¿Quién eres?</label>
|
||||
<div class="login-role-grid">
|
||||
<div onclick="selectLoginRole('padre')" id="loginRoleCardPadre" class="login-role-card selected">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="9" cy="7" r="3.5"/>
|
||||
<path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/>
|
||||
<circle cx="17.5" cy="7.5" r="2.5"/>
|
||||
<path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Padre</span>
|
||||
<span class="login-role-desc">o Encargado</span>
|
||||
</div>
|
||||
|
||||
<div onclick="selectLoginRole('estudiante')" id="loginRoleCardEstudiante" class="login-role-card">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1-2.5-2.5Z"/>
|
||||
<path d="M6 6h10"/>
|
||||
<path d="M6 10h10"/>
|
||||
<circle cx="12" cy="15" r="2"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Estudiante</span>
|
||||
<span class="login-role-desc">Carné QR</span>
|
||||
</div>
|
||||
|
||||
<div onclick="selectLoginRole('personal')" id="loginRoleCardPersonal" class="login-role-card">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M6 13.8V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v9.8"/>
|
||||
<path d="M4 13.8h16a1 1 0 0 1 1 1V20a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5.2a1 1 0 0 1 1-1Z"/>
|
||||
<line x1="10" y1="18" x2="14" y2="18"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Personal</span>
|
||||
<span class="login-role-desc">Soda / Cocina</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label id="lblLoginUser" for="loginUsername">Usuario o Teléfono del Padre:</label>
|
||||
<input type="text" id="loginUsername" class="login-input" placeholder="Ej: padre, carlos_papa o 8888-1122" value="padre">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label id="lblLoginPass" for="loginPassword">Contraseña:</label>
|
||||
<input type="password" id="loginPassword" class="login-input" placeholder="••••••••" value="••••••••">
|
||||
</div>
|
||||
|
||||
<button type="submit" id="btnLoginSubmit" class="login-submit-btn" style="display: flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/></svg>
|
||||
<span id="lblBtnLoginText">Ingresar como Padre / Encargado</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!-- ACCESOS RÁPIDOS DE PRUEBA (1-CLICK DEMO) -->
|
||||
<div class="login-demo-box">
|
||||
<div class="login-demo-title">Accesos Rápidos de Prueba:</div>
|
||||
<div class="login-demo-btns">
|
||||
<button type="button" class="login-demo-btn" style="border: 1.5px solid #0284c7; background: #f0f9ff;">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#0284c7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>
|
||||
<span style="color: #0284c7; font-weight: 800;">Developer</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<span>Admin Soda</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="5" rx="2"/><line x1="2" x2="22" y1="10" y2="10"/></svg>
|
||||
<span>Cajero</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
|
||||
<span>Padre</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function selectLoginRole(role) {
|
||||
document.getElementById('loginRoleCardPadre').classList.toggle('selected', role === 'padre');
|
||||
document.getElementById('loginRoleCardEstudiante').classList.toggle('selected', role === 'estudiante');
|
||||
document.getElementById('loginRoleCardPersonal').classList.toggle('selected', role === 'personal');
|
||||
|
||||
const lblUser = document.getElementById('lblLoginUser');
|
||||
const inputUser = document.getElementById('loginUsername');
|
||||
const btnText = document.getElementById('lblBtnLoginText');
|
||||
|
||||
if (role === 'estudiante') {
|
||||
lblUser.textContent = 'Carné o Código de Estudiante:';
|
||||
inputUser.placeholder = 'Ej: EST-2026-00001';
|
||||
btnText.textContent = 'Ingresar como Estudiante';
|
||||
} else if (role === 'personal') {
|
||||
lblUser.textContent = 'Usuario de Personal / Cocina:';
|
||||
inputUser.placeholder = 'Ej: cocina, cajero, soda';
|
||||
btnText.textContent = 'Ingresar al Personal de Soda / Cocina';
|
||||
} else {
|
||||
lblUser.textContent = 'Usuario o Teléfono del Padre:';
|
||||
inputUser.placeholder = 'Ej: padre, 8888-1122';
|
||||
btnText.textContent = 'Ingresar como Padre / Encargado';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 472 KiB |
|
After Width: | Height: | Size: 178 KiB |
|
After Width: | Height: | Size: 426 KiB |
|
After Width: | Height: | Size: 328 KiB |
|
After Width: | Height: | Size: 333 KiB |
|
After Width: | Height: | Size: 574 KiB |
|
After Width: | Height: | Size: 565 KiB |
|
After Width: | Height: | Size: 369 KiB |
|
After Width: | Height: | Size: 724 KiB |
|
After Width: | Height: | Size: 364 KiB |
|
After Width: | Height: | Size: 231 KiB |
|
After Width: | Height: | Size: 947 KiB |
|
After Width: | Height: | Size: 402 KiB |
|
After Width: | Height: | Size: 404 KiB |
|
After Width: | Height: | Size: 273 KiB |
|
After Width: | Height: | Size: 383 KiB |
|
After Width: | Height: | Size: 262 KiB |
|
After Width: | Height: | Size: 741 KiB |
|
After Width: | Height: | Size: 377 KiB |
|
After Width: | Height: | Size: 234 KiB |
|
After Width: | Height: | Size: 974 KiB |
|
After Width: | Height: | Size: 417 KiB |
|
After Width: | Height: | Size: 419 KiB |
|
After Width: | Height: | Size: 290 KiB |
|
After Width: | Height: | Size: 410 KiB |
|
After Width: | Height: | Size: 279 KiB |
|
After Width: | Height: | Size: 648 KiB |
|
After Width: | Height: | Size: 249 KiB |
|
After Width: | Height: | Size: 208 KiB |
|
After Width: | Height: | Size: 357 KiB |
|
After Width: | Height: | Size: 281 KiB |
|
After Width: | Height: | Size: 224 KiB |
|
After Width: | Height: | Size: 620 KiB |
|
After Width: | Height: | Size: 290 KiB |
|
After Width: | Height: | Size: 924 KiB |