Compare commits

..
76 Commits
Author SHA1 Message Date
unknown a8357c3158 feat(legal): agregar enlace visible a eliminacion de cuenta en landing footer y politicas 2026-10-13 11:32:07 -06:00
unknown b5e421cf25 feat(auth): toggle visibilidad de contrasena con icono de ojo v20.9 2026-10-13 11:20:50 -06:00
unknown ed7989a280 chore(auth): seed cuentas de revision para Google Play Console 2026-10-13 11:11:09 -06:00
unknown c053a74d69 feat(student): autorecarga sinpe y presupuesto personal para alumnos autoadministrados v20.8 2026-10-13 10:59:58 -06:00
unknown 1f0207a5ee feat(auth): agregar modal de selección de registro Padre vs Alumno con banners y roles dedicados 2026-10-13 09:53:32 -06:00
unknown 798cc33add fix(auth): eliminar banner completo de registro de padres y actualizar versión de caché a v20.6 2026-10-13 09:35:45 -06:00
unknown 459a007596 feat(auth): actualizar registro con fecha de nacimiento, clave min 6 chars y restablecimiento por correo 2026-10-13 09:31:21 -06:00
unknown 140cc3f523 fix: resolve SINPE toggle switch interaction and broadcast avisos display 2026-10-09 16:56:04 -06:00
unknown d60b38582f feat: broadcast banners and SINPE suspension en caliente (v20.5) 2026-10-09 16:33:57 -06:00
unknown 021844ef0a fix(escuela): req.body fallback defensivo en PUT /api/admin/escuela/sinpe 2026-10-09 12:33:43 -06:00
unknown 2057a610fb feat(admin): permitir al administrador configurar numero y titular SINPE en caliente v20.4 2026-10-09 12:32:22 -06:00
unknown 2c7e468d22 fix(auth): safe storage resiliente contra QuotaExceededError y purga offline v20.3 2026-10-09 12:20:53 -06:00
unknown a71c4e7f34 feat: asegurar sincronizacion bidireccional y killswitch estricto de transferencias P2P v20.2 2026-10-09 11:57:32 -06:00
unknown ef1e1a373e feat(developer): interruptor maestro global de transferencias P2P en caliente con propagacion reactiva SSE y killswitch backend 2026-10-09 11:55:17 -06:00
unknown 81bba2885d fix(developer): corregir anidamiento dom de devTabContentReglas y subir version a v20.0 2026-10-09 11:37:42 -06:00
unknown a488775097 fix: precargar globalConfig tras initDatabase y fallback resiliente 2026-10-09 11:26:49 -06:00
unknown 56b10b4a99 feat: implementacion del configurador de reglas de negocio en caliente en developer 2026-10-09 11:25:02 -06:00
unknown 1253dfaaca feat: logs detallados y descriptivos en terminal web de developer 2026-10-09 10:59:56 -06:00
unknown 9a34660ce4 feat: permitir cancelacion de ordenes a padres y alumnos con liberacion inmediata de saldo 2026-10-09 10:44:10 -06:00
unknown 2ca9cadc8a feat(developer): implementar visor de logs del servidor y terminal web en vivo con sse 2026-10-09 10:22:29 -06:00
unknown 220e070f0b feat(developer): reestructurar navegacion a barra lateral izquierda (sidebar) con diseno responsive 2026-10-09 09:41:12 -06:00
unknown 038193024d feat(ui): implementar barra flotante reactiva con boton verde de pre-orden para padres en web y pwa, y reparar boton de ajustes 2026-10-09 09:22:54 -06:00
unknown 84c733ad9f Refinar computo de totales de compras en endpoint kardex 2026-10-09 03:13:58 -06:00
unknown 3ac28f7f17 Implementar Kardex y Auditoria 360 de Estudiantes en Panel Developer con compras detalladas y recargas 2026-10-09 03:09:55 -06:00
unknown c420e3c6a0 Implementar ficha tecnica de estudiante con saldos en vivo y auditoria post-vinculacion 2026-10-09 02:49:47 -06:00
unknown c3df48465a Mejorar busqueda de estudiantes en backend con normalizacion de acentos NFD 2026-10-09 02:38:52 -06:00
unknown 5f22022580 Corregir buscador y vinculacion de estudiantes en modal de deposito SINPE con normalizacion de acentos y endpoint dedicado 2026-10-09 02:35:40 -06:00
unknown 87125987b1 Implementar Buscador Universal SINPE Móvil y suite de auditoría y conciliación Developer 2026-10-09 02:24:00 -06:00
unknown e784a84f10 Remover botones de Mi QR y Transferir dentro de la tarjeta virtual para dejarla limpia y usar la barra inferior 2026-10-09 01:57:28 -06:00
unknown deebf03c84 Restaurar proporcion 1.586 tarjeta credito, scroll a inicio en portal padres, vibracion haptica tangible y ajustes solo en barra inferior 2026-10-09 01:34:21 -06:00
unknown 532f95942a Solucionar retorno directo a /app desde legales y formulario de eliminar cuenta 2026-10-09 01:04:59 -06:00
unknown 8fab0f1c39 Corregir e independizar controlador de modal de Ajustes y Eliminacion de Cuenta, anadir acceso PWA y purgar cache sw v17.0 2026-10-09 00:47:09 -06:00
unknown 270a3a64c3 Actualizar eslogan de marca a Sistema inteligente de billetera online 2026-10-09 00:31:52 -06:00
unknown 8e6a6c2dc5 fix: corregir corte de 5pm para preordenes permitiendo pedidos nocturnos para el dia siguiente 2026-10-09 00:06:17 -06:00
unknown 995f0c7f2c feat: eliminar cuenta (Google Play compliance), resiliencia offline soda y experiencia haptica sensorial 2026-10-08 23:53:48 -06:00
unknown d2871c992a feat(store): agregar grafico de funciones oficial 1024x500 para Google Play Console 2026-10-08 23:01:45 -06:00
unknown 03b7a214df fix(twa): middleware universal para /.well-known/assetlinks.json 2026-10-08 22:59:37 -06:00
unknown 98f5d1e2a7 feat(twa): agregar .well-known/assetlinks.json para verificacion oficial Google Play Android 2026-10-08 22:55:07 -06:00
unknown bf0ddc881d feat(pwa): agregar wide screenshot, display_override y prefer_related_applications 2026-10-08 22:44:34 -06:00
unknown 68e9cdf109 chore(brand): actualizar manifest y titulos a plataforma digital universal e internacional 2026-10-08 22:41:47 -06:00
unknown 8a157e4204 feat(pwa): vincular manifest y service worker en landing page root desktop-preview.html 2026-10-08 22:37:12 -06:00
unknown eb16f01ad9 feat(pwa): manifest.json con screenshots y especificaciones completas para Google Play Store 2026-10-08 22:28:39 -06:00
unknown 06beb22c1f perf: arranque ultrarapido pwa con gzip compression stale-while-revalidate y renderizado optimista 2026-10-08 22:09:49 -06:00
unknown da5dbd24f8 feat(database): actualizar a sibopay_db con usuario dedicado sibopay_user 2026-10-08 21:49:06 -06:00
unknown b142884ec7 fix: check script import 2026-10-08 21:28:12 -06:00
unknown ce8a2b7cf9 chore: add db check script 2026-10-08 21:27:09 -06:00
unknown 409f3844fd fix(security): real-time synchronization of QR biometric lock between parent and student devices via PostgreSQL and SSE 2026-10-08 21:24:13 -06:00
unknown 3faf9bfd81 feat(security): add biometric and PIN QR security card to parent portal credenciales view with backend sync 2026-10-08 21:10:46 -06:00
unknown cf3e236c69 feat(security): lock biometric settings behind authentication and restrict access to parental panel 2026-10-08 20:57:20 -06:00
unknown 96b1306739 feat(security): add biometric (face id / fingerprint) and pin unlock protection for payment qr 2026-10-08 20:40:08 -06:00
unknown 688502cf36 feat(ui): rollback login card and qr payment modal to previous original design 2026-10-08 20:14:39 -06:00
unknown 2862225e2d feat(ui): add glassmorphism design to payment qr modal and login card with rollback backups 2026-10-08 19:58:13 -06:00
unknown 16cb760cfc feat(ui): apply pure white glassmorphism capsules to balance and student code on cards 2026-10-08 19:41:20 -06:00
unknown 935b3780f5 feat(cards): remove chip icon and add option to set default card theme for new users 2026-10-08 19:28:58 -06:00
unknown 2c7856f642 fix(ui): make all form and writing modals persistent and protect unsaved input 2026-10-08 18:45:30 -06:00
unknown 7c62608519 feat(developer): add individual student registration with school selector in developer suite 2026-10-08 18:24:52 -06:00
unknown 87c5baa263 feat: complete multi-tenant school isolation across backend, admin, and pos 2026-10-08 17:56:53 -06:00
unknown 795d9b9072 fix(admin): adaptar botones de navegacion admin de forma responsive para pantallas de 14 pulgadas y menores 2026-10-08 16:34:36 -06:00
unknown 18e91d95c9 fix(session): corregir persistencia de sesion en F5 y visibilidad de dashboard de padres 2026-10-08 15:44:55 -06:00
unknown 7f9c203453 fix(server): corregir columna codigo_estudiante en consulta de dashboard de padres 2026-10-08 15:29:08 -06:00
unknown 282bc49258 feat(padres): agregar dashboard ejecutivo familiar con metricas de saldo, compras y recargas, filtro de hijos y exportacion Excel 2026-10-08 15:27:36 -06:00
unknown e9a38b15d7 feat(admin): implementar dashboard ejecutivo de informacion con KPIs, momentos escolares y finanzas 2026-10-08 14:32:31 -06:00
unknown dff03f98d0 feat(audio): desactivar completamente todos los sonidos de la aplicacion y del inicio de sesion 2026-10-08 13:49:03 -06:00
unknown 186a0ebab9 feat(padres): agregar opcion Ver motivo con modal explicativo para recargas SINPE rechazadas 2026-10-08 13:38:27 -06:00
unknown abee440e12 feat(export): generar reportes nativos en Excel XLSX con acentos limpios y columnas perfectas 2026-10-08 13:16:33 -06:00
unknown 5a0683d199 fix(sinpe): asegurar visibilidad y apertura dinamica del modal de rechazo de recargas 2026-10-08 12:47:17 -06:00
unknown e7d1d86978 feat: trazabilidad detallada en rechazos SINPE, modales en la app y formato Excel con columnas separadas 2026-10-08 12:23:57 -06:00
unknown 6f0cb55658 style(pos): redimensionar filtros de preordenes y compactar tarjetas de ordenes en un 28% 2026-10-08 11:56:31 -06:00
unknown 2b1b3f418c feat: configuracion de horarios escolares admin, reporte excel recargas sinpe y remocion enlaces footer 2026-10-08 11:39:58 -06:00
unknown 8ab81c3e5e feat(pos): cancelacion automatica en cierre de caja y 5pm, filtro de canceladas y contador a cero 2026-10-08 11:10:45 -06:00
unknown 6b2512886a fix(pg): compatibilidad postgresql para expiracion de preordenes sin strftime 2026-10-08 10:48:50 -06:00
unknown 7fb10ca819 fix(cache): purgar service worker e incrementar cache buster a v13.0 2026-10-08 10:35:39 -06:00
unknown e7d59bf471 feat: saldo flotante en preordenes, bloqueo de QR por limite diario, cierre de caja y terminos sin canje en efectivo 2026-10-08 10:15:03 -06:00
unknown 237d00acab fix(legal): enlaces directos a /terminos y /privacidad sin modal en inicio de sesion 2026-10-07 19:24:17 -06:00
unknown c0b827bca1 feat(routing): landing informativa en raiz / y navegacion directa a /app para inicio de sesion oficial 2026-10-07 19:05:26 -06:00
unknown 6832ca1833 fix(routing): servir inicio de sesion oficial (index.html) en la raiz / y redirigir botones a la app 2026-10-07 18:29:58 -06:00
48 changed files with 20109 additions and 1274 deletions
+197 -4
View File
@@ -10,16 +10,19 @@
"license": "ISC",
"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"
}
},
"node_modules/@pkgr/core": {
@@ -263,6 +266,15 @@
"node": ">= 0.6"
}
},
"node_modules/adler-32": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz",
"integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/agent-base": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
@@ -416,6 +428,19 @@
"node": ">=6"
}
},
"node_modules/cfb": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz",
"integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
"license": "Apache-2.0",
"dependencies": {
"adler-32": "~1.3.0",
"crc-32": "~1.2.0"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/chromium-bidi": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-17.0.2.tgz",
@@ -443,6 +468,15 @@
"wrap-ansi": "^6.2.0"
}
},
"node_modules/codepage": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz",
"integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
@@ -461,6 +495,65 @@
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"license": "MIT"
},
"node_modules/compressible": {
"version": "2.0.18",
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
"integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
"license": "MIT",
"dependencies": {
"mime-db": ">= 1.43.0 < 2"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/compression": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/compression/-/compression-1.8.2.tgz",
"integrity": "sha512-o8vI5RE5A6EVVOd9o41jKp41aJom+QTEO/Bx8MYNjexMo/Bv2WOjUfZr+aL0WnYSgymUy6zeguqLTsIhV0gMvQ==",
"license": "MIT",
"dependencies": {
"bytes": "3.1.2",
"compressible": "~2.0.18",
"debug": "2.6.9",
"destroy": "1.2.0",
"negotiator": "~0.6.4",
"on-headers": "~1.1.0",
"safe-buffer": "5.2.1",
"vary": "~1.1.2"
},
"engines": {
"node": ">= 0.8.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
}
},
"node_modules/compression/node_modules/debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"license": "MIT",
"dependencies": {
"ms": "2.0.0"
}
},
"node_modules/compression/node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
"license": "MIT"
},
"node_modules/compression/node_modules/negotiator": {
"version": "0.6.4",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz",
"integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/content-disposition": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz",
@@ -524,6 +617,18 @@
"url": "https://opencollective.com/express"
}
},
"node_modules/crc-32": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",
"license": "Apache-2.0",
"bin": {
"crc32": "bin/crc32.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/debug": {
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
@@ -578,6 +683,16 @@
"node": ">= 0.8"
}
},
"node_modules/destroy": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
"license": "MIT",
"engines": {
"node": ">= 0.8",
"npm": "1.2.8000 || >= 1.4.16"
}
},
"node_modules/devtools-protocol": {
"version": "0.0.1687809",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1687809.tgz",
@@ -850,6 +965,15 @@
"node": ">= 0.6"
}
},
"node_modules/frac": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
"integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/fresh": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
@@ -1268,6 +1392,15 @@
"node": ">=20.0.0"
}
},
"node_modules/mailparser/node_modules/nodemailer": {
"version": "10.0.14",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-10.0.14.tgz",
"integrity": "sha512-eJoLFKg55fesSlzUekmfOv/SBXh4KUYT8oiQc2RLP0tfG0rbNMJBK7wgHJwXTJwqyKlSJMz9UzDZ4v+aHEvo8g==",
"license": "MIT-0",
"engines": {
"node": ">=20.0.0"
}
},
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
@@ -1418,9 +1551,9 @@
"license": "MIT"
},
"node_modules/nodemailer": {
"version": "10.0.14",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-10.0.14.tgz",
"integrity": "sha512-eJoLFKg55fesSlzUekmfOv/SBXh4KUYT8oiQc2RLP0tfG0rbNMJBK7wgHJwXTJwqyKlSJMz9UzDZ4v+aHEvo8g==",
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-10.1.0.tgz",
"integrity": "sha512-fXW8AulB25aOTuwfRYV6lqHyfz2VM4rr4SGXH03mE7x5znEUpzL5mu6anARUpZN7744Ziwkmr4AxSLPJsBQspg==",
"license": "MIT-0",
"engines": {
"node": ">=20.0.0"
@@ -1459,6 +1592,15 @@
"node": ">= 0.8"
}
},
"node_modules/on-headers": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
"integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -2050,6 +2192,18 @@
"node": ">= 10.x"
}
},
"node_modules/ssf": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz",
"integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
"license": "Apache-2.0",
"dependencies": {
"frac": "~1.1.2"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/statuses": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
@@ -2235,6 +2389,24 @@
"integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==",
"license": "ISC"
},
"node_modules/wmf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/word": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz",
"integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
@@ -2276,6 +2448,27 @@
}
}
},
"node_modules/xlsx": {
"version": "0.18.5",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz",
"integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
"license": "Apache-2.0",
"dependencies": {
"adler-32": "~1.3.0",
"cfb": "~1.2.1",
"codepage": "~1.15.0",
"crc-32": "~1.2.1",
"ssf": "~0.11.2",
"wmf": "~1.0.1",
"word": "~0.3.0"
},
"bin": {
"xlsx": "bin/xlsx.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+4 -1
View File
@@ -22,15 +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"
}
}
+8
View File
@@ -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"]
}
}]
+878
View File
@@ -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>
+938
View File
@@ -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>
+1449 -121
View File
File diff suppressed because it is too large Load Diff
+24 -86
View File
@@ -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() {
window.location.href = '/app';
}
function quickLoginRole(role) {
toggleLoginModal(true);
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js?v=18.1').catch(err => console.log('SW error:', err));
});
}
</script>
+300
View File
@@ -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>
+2713 -139
View File
File diff suppressed because it is too large Load Diff
+5905 -219
View File
File diff suppressed because it is too large Load Diff
+542
View File
@@ -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();
}
}
});
})();
+718 -102
View File
File diff suppressed because it is too large Load Diff
+224 -106
View File
@@ -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;
if (AudioCtx) {
try {
this.ctx = new AudioCtx();
}
if (this.ctx.state === 'suspended') {
this.ctx.resume();
}
}
// Sonido de escaneo exitoso / cobro completado (Tono alegre ascendente)
playSuccess() {
try {
this.init();
const now = this.ctx.currentTime;
const osc1 = this.ctx.createOscillator();
const osc2 = this.ctx.createOscillator();
const gain = this.ctx.createGain();
osc1.type = 'triangle';
osc2.type = 'sine';
// 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);
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);
console.warn('[SensorySystem] No se pudo inicializar AudioContext:', e);
}
}
}
if (this.ctx && this.ctx.state === 'suspended') {
this.ctx.resume().catch(() => {});
}
return this.ctx;
}
// Sonido de moneda para Modo Kids
playCoin() {
// ==========================================
// RETROALIMENTACIÓN HÁPTICA (VIBRACIÓN TÁCTIL)
// ==========================================
vibrate(pattern) {
if (!this.hapticEnabled) return;
try {
this.init();
const now = this.ctx.currentTime;
const osc = this.ctx.createOscillator();
const gain = this.ctx.createGain();
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 {
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);
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);
osc.connect(gain);
gain.connect(ctx.destination);
osc.start(now + index * 0.08);
osc.stop(now + index * 0.08 + 0.36);
});
} catch (e) {}
}
// Sonido de moneda / pago registrado (doble tintineo metálico)
playCoin() {
this.hapticSuccess();
if (!this.soundEnabled) return;
const ctx = this._getAudioContext();
if (!ctx) return;
try {
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);
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);
osc.connect(gain);
gain.connect(ctx.destination);
osc.start(now + index * 0.09);
osc.stop(now + index * 0.09 + 0.30);
});
} catch (e) {}
}
// 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 {
const now = ctx.currentTime;
const osc = ctx.createOscillator();
const gain = ctx.createGain();
osc.type = 'sine';
osc.frequency.setValueAtTime(987.77, now); // B5
osc.frequency.setValueAtTime(1318.51, now + 0.08); // E6
osc.frequency.setValueAtTime(1400, now);
osc.frequency.exponentialRampToValueAtTime(1900, now + 0.04);
gain.gain.setValueAtTime(0.25, now);
gain.gain.exponentialRampToValueAtTime(0.01, now + 0.3);
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.3);
osc.stop(now + 0.05);
} catch (e) {}
}
// Chirp de escáner láser de código de barras
playScanChirp() {
// 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 {
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 = 'square';
osc.frequency.setValueAtTime(2000, now);
osc.frequency.exponentialRampToValueAtTime(1200, now + 0.06);
osc.type = 'sine';
osc.frequency.setValueAtTime(440, now);
osc.frequency.exponentialRampToValueAtTime(220, now + 0.025);
gain.gain.setValueAtTime(0.15, now);
gain.gain.exponentialRampToValueAtTime(0.01, now + 0.07);
gain.gain.setValueAtTime(this.masterVolume * 0.4, now);
gain.gain.exponentialRampToValueAtTime(0.0001, now + 0.03);
osc.connect(gain);
gain.connect(this.ctx.destination);
gain.connect(ctx.destination);
osc.start(now);
osc.stop(now + 0.07);
osc.stop(now + 0.03);
} catch (e) {}
}
// Sonido de error / límite superado (Tono grave de advertencia)
// Tono de error o rechazo (dos tonos bajos descendentes)
playError() {
this.hapticError();
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 = [260, 195];
tones.forEach((freq, idx) => {
const osc = ctx.createOscillator();
const gain = ctx.createGain();
osc.type = 'sawtooth';
osc.frequency.setValueAtTime(220, now);
osc.frequency.setValueAtTime(180, now + 0.15);
osc.frequency.setValueAtTime(freq, now + idx * 0.12);
gain.gain.setValueAtTime(0.2, now);
gain.gain.exponentialRampToValueAtTime(0.01, now + 0.35);
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(this.ctx.destination);
gain.connect(ctx.destination);
osc.start(now);
osc.stop(now + 0.35);
osc.start(now + idx * 0.12);
osc.stop(now + idx * 0.12 + 0.15);
});
} 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();
osc.type = 'sine';
osc.frequency.setValueAtTime(600, now);
osc.frequency.exponentialRampToValueAtTime(300, now + 0.04);
gain.gain.setValueAtTime(0.08, now);
gain.gain.exponentialRampToValueAtTime(0.001, now + 0.04);
osc.connect(gain);
gain.connect(this.ctx.destination);
osc.start(now);
osc.stop(now + 0.04);
} 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)
};
+60 -10
View File
@@ -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();
+47 -5
View File
@@ -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"
}
]
}
+2 -33
View File
@@ -450,34 +450,8 @@
let lastScannedToken = null;
let lastScannedTime = 0;
let sseSource = null;
let audioCtx = null;
// Inicializar Audio Web sintético (beeper de pistola POS)
function playLaserBeep() {
try {
if (!audioCtx) {
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
}
if (audioCtx.state === 'suspended') {
audioCtx.resume();
}
const osc = audioCtx.createOscillator();
const gain = audioCtx.createGain();
// Tono agudo característico de pistola lectora de supermercado (2400Hz)
osc.type = 'sine';
osc.frequency.setValueAtTime(2400, audioCtx.currentTime);
gain.gain.setValueAtTime(0.35, audioCtx.currentTime);
gain.gain.exponentialRampToValueAtTime(0.01, audioCtx.currentTime + 0.08);
osc.connect(gain);
gain.connect(audioCtx.destination);
osc.start();
osc.stop(audioCtx.currentTime + 0.08);
} catch (e) {
console.warn('Audio feedback error:', e);
}
}
// Inicializar Audio Web sintético (beeper de pistola POS) - DESACTIVADO
function playLaserBeep() {}
// Vibración háptica
function vibratePhone() {
@@ -719,11 +693,6 @@
window.addEventListener('DOMContentLoaded', () => {
initSSEConnection();
startScannerCamera();
// Desbloquear AudioContext al primer toque
document.body.addEventListener('click', () => {
if (!audioCtx) playLaserBeep();
}, { once: true });
});
</script>
</body>
+137 -17
View File
@@ -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?v=10.7">
<link rel="stylesheet" href="/css/styles.css?v=14.0">
<style>
/* Estilos específicos de terminal de alta velocidad */
.student-badge-scanned {
@@ -78,7 +78,7 @@
localStorage.removeItem('recreopay_user');
sessionStorage.clear();
} catch (e) {}
window.location.href = '/index.html?logout=true';
window.location.href = '/index.html';
}
window.posLogout = posLogout;
</script>
@@ -104,6 +104,9 @@
</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">
@@ -131,9 +134,9 @@
<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>
@@ -146,11 +149,29 @@
<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) -->
@@ -229,22 +250,21 @@
</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>
<!-- FILTROS POR RECREO / HORARIO -->
<div class="pos-preorder-filter-bar">
<button type="button" class="pos-filter-pill active" id="filterPillTodos" onclick="filterPreOrdersByMomento('todos')">
<span>📋 Todos los Recreos</span>
<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')">
@@ -259,9 +279,13 @@
<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: 12px;">
<div id="preOrdersList" style="display: flex; flex-direction: column; gap: 8px;">
<!-- Lista de pre-órdenes -->
</div>
</div>
@@ -276,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>
@@ -571,9 +599,101 @@
<!-- CONTENEDOR DE TICKET TÉRMICO OCULTO EN PANTALLA (VISIBLE EN IMPRESIÓN 58mm / 80mm) -->
<div id="posThermalReceipt" style="display: none;"></div>
<script src="/js/sounds.js?v=8.6"></script>
<!-- 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/food-icons.js?v=1.1"></script>
<script src="/js/pos.js?v=12.0"></script>
<script src="/js/pos.js?v=20.5"></script>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 648 KiB

Before

Width:  |  Height:  |  Size: 620 KiB

After

Width:  |  Height:  |  Size: 620 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Before

Width:  |  Height:  |  Size: 924 KiB

After

Width:  |  Height:  |  Size: 924 KiB

+627
View File
@@ -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>
+24 -13
View File
@@ -1,18 +1,20 @@
// SiboPay PWA Service Worker v12.2 - Alta Velocidad & Despacho
const CACHE_NAME = 'sibopay-v12.2';
// 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',
'/css/desktop.css',
'/js/app.js',
'/js/pos.js',
'/js/sounds.js',
'/js/food-icons.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',
'/img/sibopay-emblem.png',
@@ -45,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;
}
@@ -60,7 +62,9 @@ self.addEventListener('fetch', (event) => {
}
event.respondWith(
fetch(event.request)
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();
@@ -71,12 +75,19 @@ self.addEventListener('fetch', (event) => {
return networkResponse;
})
.catch(() => {
return caches.match(event.request).then((cachedResponse) => {
if (cachedResponse) return cachedResponse;
// 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;
})
);
});
@@ -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>
+28 -8
View File
@@ -1,11 +1,11 @@
# Catálogo de Pantallas de Inicio de Sesión de SiboPay
# 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`
- **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".
@@ -16,13 +16,13 @@ Este documento actúa como la **memoria y registro de versiones** de pantallas d
- 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`.
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)
- **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).
## 🚀 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".
@@ -30,8 +30,28 @@ Este documento actúa como la **memoria y registro de versiones** de pantallas d
- 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`.
- El sistema detecta el rol automáticamente al validar credenciales contra /api/auth/login.
---
*Fecha de registro: 07 de Octubre de 2026*
## 💎 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*
Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 KiB

Before

Width:  |  Height:  |  Size: 290 KiB

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 KiB

Before

Width:  |  Height:  |  Size: 355 KiB

After

Width:  |  Height:  |  Size: 355 KiB

Before

Width:  |  Height:  |  Size: 213 KiB

After

Width:  |  Height:  |  Size: 213 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
const { Client } = require('pg');
const pgUrl = process.env.DATABASE_URL || 'postgresql://postgres:GammaPos2026@127.0.0.1:5432/recreopay_db';
const pgUrl = process.env.DATABASE_URL || 'postgresql://sibopay_user:SiboPay_Postgres_2026_SecureKey!@127.0.0.1:5432/sibopay_db';
const MAPPING = [
{ match: /empanada.*arreglada/i, url: '/img/products/empanada_arreglada.jpg' },
+1 -1
View File
@@ -1,6 +1,6 @@
const { Client } = require('pg');
const pgUrl = process.env.DATABASE_URL || 'postgresql://postgres:GammaPos2026@127.0.0.1:5432/recreopay_db';
const pgUrl = process.env.DATABASE_URL || 'postgresql://sibopay_user:SiboPay_Postgres_2026_SecureKey!@127.0.0.1:5432/sibopay_db';
async function runAudit() {
const client = new Client({ connectionString: pgUrl });
+19
View File
@@ -0,0 +1,19 @@
const { db } = require('../server/db.js');
try {
const row = db.prepare(`
SELECT column_name, data_type, column_default
FROM information_schema.columns
WHERE table_name = 'estudiantes' AND column_name = 'bloqueo_qr_biometrico'
`).get();
console.log('PG_COLUMN_INFO:', JSON.stringify(row));
const sample = db.prepare(`
SELECT id, codigo_estudiante, nombre_completo, bloqueo_qr_biometrico
FROM estudiantes
LIMIT 3
`).all();
console.log('PG_STUDENTS_SAMPLE:', JSON.stringify(sample));
} catch (err) {
console.error('ERROR_CHECKING_PG:', err.message);
}
+1 -1
View File
@@ -1,5 +1,5 @@
const { Client } = require('pg');
const pgUrl = process.env.DATABASE_URL || 'postgresql://postgres:GammaPos2026@127.0.0.1:5432/recreopay_db';
const pgUrl = process.env.DATABASE_URL || 'postgresql://sibopay_user:SiboPay_Postgres_2026_SecureKey!@127.0.0.1:5432/sibopay_db';
async function run() {
const client = new Client({ connectionString: pgUrl });
+1 -1
View File
@@ -1,6 +1,6 @@
const { Client } = require('pg');
const pgUrl = process.env.DATABASE_URL || 'postgresql://postgres:GammaPos2026@127.0.0.1:5432/recreopay_db';
const pgUrl = process.env.DATABASE_URL || 'postgresql://sibopay_user:SiboPay_Postgres_2026_SecureKey!@127.0.0.1:5432/sibopay_db';
async function deepAudit() {
const client = new Client({ connectionString: pgUrl });
+1 -1
View File
@@ -1,6 +1,6 @@
const { Client } = require('pg');
const pgUrl = process.env.DATABASE_URL || 'postgresql://postgres:GammaPos2026@127.0.0.1:5432/recreopay_db';
const pgUrl = process.env.DATABASE_URL || 'postgresql://sibopay_user:SiboPay_Postgres_2026_SecureKey!@127.0.0.1:5432/sibopay_db';
async function fixAllNulls() {
const client = new Client({ connectionString: pgUrl });
+157
View File
@@ -0,0 +1,157 @@
const puppeteer = require('puppeteer-core');
const path = require('path');
const fs = require('fs');
const CHROME_PATH = 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe';
const OUT_PATH = path.join(__dirname, '../screenshots/google_play_store/feature_graphic_1024x500.png');
const EMBLEM_PATH = path.join(__dirname, '../public/img/sibopay-emblem.png');
async function generate() {
const emblemBase64 = fs.readFileSync(EMBLEM_PATH).toString('base64');
const emblemSrc = `data:image/png;base64,${emblemBase64}`;
const html = `
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
body {
width: 1024px;
height: 500px;
background: radial-gradient(circle at 75% 30%, #0369a1 0%, #052036 60%, #021220 100%);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 70px;
color: #ffffff;
overflow: hidden;
position: relative;
}
.accent-circle {
position: absolute;
width: 450px;
height: 450px;
border-radius: 50%;
background: radial-gradient(circle, rgba(2, 132, 199, 0.25) 0%, transparent 70%);
top: -80px;
right: 120px;
pointer-events: none;
}
.left {
max-width: 580px;
z-index: 2;
}
.badge {
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(2, 132, 199, 0.25);
border: 1px solid rgba(56, 189, 248, 0.4);
padding: 6px 14px;
border-radius: 999px;
font-size: 13px;
font-weight: 700;
color: #7dd3fc;
letter-spacing: 0.5px;
text-transform: uppercase;
margin-bottom: 18px;
}
h1 {
font-size: 54px;
font-weight: 900;
letter-spacing: -1px;
line-height: 1.1;
margin-bottom: 12px;
background: linear-gradient(135deg, #ffffff 40%, #bae6fd 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
p {
font-size: 20px;
color: #94a3b8;
font-weight: 500;
line-height: 1.4;
margin-bottom: 24px;
}
.features {
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.feature-pill {
background: rgba(15, 23, 42, 0.6);
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 7px 14px;
border-radius: 10px;
font-size: 13px;
font-weight: 700;
color: #e2e8f0;
backdrop-filter: blur(10px);
}
.right {
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
}
.logo-card {
width: 220px;
height: 220px;
background: rgba(255, 255, 255, 0.05);
border: 2px solid rgba(56, 189, 248, 0.3);
border-radius: 44px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 25px 60px -15px rgba(2, 132, 199, 0.5), inset 0 0 25px rgba(255,255,255,0.1);
backdrop-filter: blur(16px);
}
.logo-img {
width: 140px;
height: 140px;
object-fit: contain;
}
</style>
</head>
<body>
<div class="accent-circle"></div>
<div class="left">
<div class="badge">
<span>⚡ Plataforma Digital</span>
</div>
<h1>SiboPay</h1>
<p>Pagos rápidos, transferencias y monedero digital seguro.</p>
<div class="features">
<div class="feature-pill">💳 Monedero Digital</div>
<div class="feature-pill">🔒 QR con Biometría</div>
<div class="feature-pill">⚡ Transferencias P2P</div>
<div class="feature-pill">📊 Control de Consumo</div>
</div>
</div>
<div class="right">
<div class="logo-card">
<img src="${emblemSrc}" class="logo-img" alt="SiboPay Logo">
</div>
</div>
</body>
</html>
`;
const browser = await puppeteer.launch({
executablePath: CHROME_PATH,
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox', '--window-size=1024,500']
});
const page = await browser.newPage();
await page.setViewport({ width: 1024, height: 500, deviceScaleFactor: 1 });
await page.setContent(html, { waitUntil: 'networkidle0' });
await page.screenshot({ path: OUT_PATH, type: 'png' });
await browser.close();
console.log('✅ Feature Graphic generado exitosamente en:', OUT_PATH);
}
generate().catch(console.error);
+1 -1
View File
@@ -5,7 +5,7 @@ const path = require('path');
const sqlitePath = path.join(__dirname, '..', 'server', 'recreopay.db');
const dbSqlite = new Database(sqlitePath);
const pgUrl = process.env.DATABASE_URL || 'postgresql://postgres:GammaPos2026@127.0.0.1:5432/recreopay_db';
const pgUrl = process.env.DATABASE_URL || 'postgresql://sibopay_user:SiboPay_Postgres_2026_SecureKey!@127.0.0.1:5432/sibopay_db';
const client = new Client({ connectionString: pgUrl });
async function migrate() {
+1 -1
View File
@@ -1,6 +1,6 @@
const { Client } = require('pg');
const pgUrl = process.env.DATABASE_URL || 'postgresql://postgres:GammaPos2026@127.0.0.1:5432/recreopay_db';
const pgUrl = process.env.DATABASE_URL || 'postgresql://sibopay_user:SiboPay_Postgres_2026_SecureKey!@127.0.0.1:5432/sibopay_db';
const NEW_PRODUCTS = [
// --- 10 COMIDAS Y SNACKS ---
+1410 -50
View File
File diff suppressed because it is too large Load Diff
+75
View File
@@ -0,0 +1,75 @@
const nodemailer = require('nodemailer');
/**
* Servicio de envío de correos electrónicos transaccionales para SiboPay
*/
function getTransporter() {
const user = process.env.SMTP_USER || process.env.SINPE_EMAIL_USER || '[email protected]';
const rawPass = process.env.SMTP_PASSWORD || process.env.SINPE_EMAIL_PASSWORD || 'aeguiflzmskmaswq';
const pass = String(rawPass).replace(/\s+/g, '');
return nodemailer.createTransport({
host: process.env.SMTP_HOST || 'smtp.gmail.com',
port: parseInt(process.env.SMTP_PORT || '465', 10),
secure: (process.env.SMTP_PORT || '465') === '465', // true para 465, false para 587
auth: {
user: user,
pass: pass
}
});
}
/**
* Envía el código numérico de 6 dígitos para restablecer contraseña
*/
async function enviarCodigoRecuperacion(destinatario, codigo, nombreUsuario = 'Usuario') {
const transporter = getTransporter();
const remitente = process.env.SMTP_FROM || `SiboPay Soporte <${process.env.SMTP_USER || '[email protected]'}>`;
const mailOptions = {
from: remitente,
to: destinatario,
subject: `🔐 SiboPay - Código para restablecer contraseña: ${codigo}`,
text: `Hola ${nombreUsuario},\n\nTu código de verificación para restablecer tu contraseña en SiboPay es: ${codigo}\n\nEste código es válido durante 15 minutos. Si no solicitaste este cambio, puedes ignorar este mensaje.\n\nAtentamente,\nEquipo SiboPay`,
html: `
<div style="font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background-color: #f8fafc; padding: 30px 15px; color: #1e293b;">
<div style="max-width: 520px; margin: 0 auto; background: #ffffff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.06); border: 1px solid #e2e8f0;">
<div style="background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); padding: 26px 20px; text-align: center; color: white;">
<h1 style="margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.5px;">SiboPay</h1>
<p style="margin: 6px 0 0; font-size: 13px; opacity: 0.9;">Recuperación Segura de Cuenta</p>
</div>
<div style="padding: 28px 24px; text-align: center;">
<h2 style="font-size: 18px; color: #0f172a; margin-top: 0; margin-bottom: 12px; font-weight: 700;">Restablecer tu Contraseña</h2>
<p style="font-size: 14px; color: #64748b; line-height: 1.5; margin: 0 0 24px;">
Hola <strong>${nombreUsuario}</strong>, recibimos una solicitud para restablecer la contraseña de tu cuenta. Ingresa el siguiente código de verificación en la aplicación:
</p>
<div style="background: #f0f9ff; border: 2px dashed #0284c7; border-radius: 12px; padding: 18px 10px; margin-bottom: 24px; display: inline-block; min-width: 200px;">
<span style="font-family: monospace; font-size: 34px; font-weight: 800; letter-spacing: 8px; color: #0369a1;">${codigo}</span>
</div>
<p style="font-size: 12px; color: #94a3b8; line-height: 1.4; margin: 0;">
⏳ Este código vencerá en <strong>15 minutos</strong>.<br>
Si no solicitaste este cambio, haz caso omiso a este correo.
</p>
</div>
<div style="background: #f1f5f9; padding: 14px 20px; text-align: center; border-top: 1px solid #e2e8f0;">
<p style="margin: 0; font-size: 11px; color: #64748b;">
&copy; SiboPay - Sistema Inteligente de Billetera Online. Todos los derechos reservados.
</p>
</div>
</div>
</div>
`
};
return transporter.sendMail(mailOptions);
}
module.exports = {
enviarCodigoRecuperacion
};
+1 -1
View File
@@ -9,7 +9,7 @@ types.setTypeParser(1700, (val) => val === null ? null : parseFloat(val)); // nu
types.setTypeParser(700, (val) => val === null ? null : parseFloat(val)); // float4 / real
types.setTypeParser(701, (val) => val === null ? null : parseFloat(val)); // float8 / double precision
const connectionString = process.env.DATABASE_URL || 'postgresql://postgres:GammaPos2026@127.0.0.1:5432/recreopay_db';
const connectionString = process.env.DATABASE_URL || 'postgresql://sibopay_user:SiboPay_Postgres_2026_SecureKey!@127.0.0.1:5432/sibopay_db';
const pool = new Pool({
connectionString,
+2463 -217
View File
File diff suppressed because it is too large Load Diff