feat: rediseño de inicio de sesion minimalista estilo OrderEAT/SiboPay con doodle gastronomico y bottom sheet; respaldo de diseno clasico
This commit is contained in:
+245
-1
@@ -2169,7 +2169,251 @@ body.dark-mode .floating-cart-bar {
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
VISTA DE LOGIN Y AUTENTICACIÓN
|
||||
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 / 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;
|
||||
}
|
||||
|
||||
.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.45;
|
||||
font-weight: 600;
|
||||
max-width: 330px;
|
||||
}
|
||||
|
||||
.splash-disclaimer a {
|
||||
color: #ffffff;
|
||||
font-weight: 900;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
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;
|
||||
|
||||
+124
-115
@@ -22,105 +22,121 @@
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<!-- VISTA DE LOGIN Y CONTROL DE ACCESO -->
|
||||
<div id="viewLogin" class="login-overlay" style="display: none;">
|
||||
<div class="login-card">
|
||||
<div class="login-brand">
|
||||
<div class="login-logo" style="margin-bottom: 6px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay Logo" style="width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(2, 132, 199, 0.3)); display: inline-block;">
|
||||
<!-- 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="login-title" style="margin: 0; font-size: 1.85rem; font-weight: 900; letter-spacing: -0.5px;">Sibo<strong style="color: #0284c7;">Pay</strong></h1>
|
||||
<p class="login-subtitle">Sistema Digital de Pagos y Monedero Estudiantil</p>
|
||||
<h1 class="splash-title">SiboPay</h1>
|
||||
<p class="splash-tagline">Sistema Digital de Pagos y Monedero Estudiantil</p>
|
||||
</div>
|
||||
|
||||
<!-- SELECTOR ENTRE INICIO DE SESIÓN Y REGISTRO -->
|
||||
<div class="login-tabs">
|
||||
<button type="button" class="login-tab-btn active" id="tabBtnLogin" onclick="switchLoginTab('login')" style="display: inline-flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/></svg>
|
||||
<span>Iniciar Sesión</span>
|
||||
<!-- 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="login-tab-btn" id="tabBtnRegister" onclick="switchLoginTab('register')" style="display: inline-flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="7" r="3.5"/><path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/><circle cx="17.5" cy="7.5" r="2.5"/><path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/></svg>
|
||||
<span>Registro de Padres</span>
|
||||
|
||||
<button type="button" class="splash-btn-secondary" onclick="openLoginSheet('register')">
|
||||
Registrarse
|
||||
</button>
|
||||
|
||||
<p class="splash-disclaimer">
|
||||
Al iniciar sesión y registrarse, acepta nuestros
|
||||
<a onclick="openTerminosModal()">términos y condiciones</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- FORMULARIO 1: INICIAR SESIÓN -->
|
||||
<!-- 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)">
|
||||
<!-- SELECTOR DE ROL: "SOY" CON ICONOS SUPERFINOS Y ELEGANTES (SIN EMOJIS) -->
|
||||
<div class="login-role-selector-wrap">
|
||||
<label style="font-size: 0.74rem; font-weight: 900; color: #475569; text-transform: uppercase; letter-spacing: 0.6px; display: block; margin-bottom: 8px;">¿Quién eres?</label>
|
||||
<div class="login-role-grid">
|
||||
<div onclick="selectLoginRole('padre')" id="loginRoleCardPadre" class="login-role-card selected">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="9" cy="7" r="3.5"/>
|
||||
<path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/>
|
||||
<circle cx="17.5" cy="7.5" r="2.5"/>
|
||||
<path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Padre</span>
|
||||
<span class="login-role-desc">o Encargado</span>
|
||||
</div>
|
||||
|
||||
<div onclick="selectLoginRole('estudiante')" id="loginRoleCardEstudiante" class="login-role-card">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1-2.5-2.5Z"/>
|
||||
<path d="M6 6h10"/>
|
||||
<path d="M6 10h10"/>
|
||||
<circle cx="12" cy="15" r="2"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Estudiante</span>
|
||||
<span class="login-role-desc">Carné QR</span>
|
||||
</div>
|
||||
|
||||
<div onclick="selectLoginRole('personal')" id="loginRoleCardPersonal" class="login-role-card">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M6 13.8V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v9.8"/>
|
||||
<path d="M4 13.8h16a1 1 0 0 1 1 1V20a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5.2a1 1 0 0 1 1-1Z"/>
|
||||
<line x1="10" y1="18" x2="14" y2="18"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Personal</span>
|
||||
<span class="login-role-desc">Soda / Caja</span>
|
||||
</div>
|
||||
</div>
|
||||
<div 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="lblLoginUser" for="loginUsername">Usuario o Teléfono del Padre:</label>
|
||||
<input type="text" id="loginUsername" class="login-input" placeholder="Ej: padre, carlos_papa o 8888-1122" required autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label id="lblLoginPass" for="loginPassword">Contraseña:</label>
|
||||
<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: 8px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; margin-bottom: 12px; text-align: center;"></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;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/></svg>
|
||||
<span id="lblBtnLoginText">Ingresar como Padre / Encargado</span>
|
||||
<button 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>
|
||||
|
||||
<!-- FORMULARIO 2: REGISTRO DE NUEVOS PADRES -->
|
||||
<form id="formRegisterPadre" onsubmit="handleRegisterPadreSubmit(event)" style="display: none;">
|
||||
<div style="background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); border: 1.5px solid #bae6fd; border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);">
|
||||
<div style="width: 44px; height: 44px; border-radius: 12px; background: white; border: 1.5px solid #bae6fd; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12); padding: 5px;">
|
||||
<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.92rem; display: block; font-weight: 800; letter-spacing: -0.2px;">Registro de Padres o Encargados</strong>
|
||||
<span style="font-size: 0.74rem; color: #475569; line-height: 1.35; display: block; margin-top: 2px;">Crea tu cuenta oficial en SiboPay para vincular a tus hijos y recargarles saldo escolar.</span>
|
||||
<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">
|
||||
@@ -132,7 +148,7 @@
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regEmail">Correo Electrónico <span style="font-size: 0.75rem; font-weight: 600; color: #64748b;">(Opcional)</span>:</label>
|
||||
<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>
|
||||
|
||||
@@ -148,56 +164,49 @@
|
||||
|
||||
<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;">
|
||||
<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>
|
||||
|
||||
<!-- ACCESOS RÁPIDOS DE PRUEBA (1-CLICK DEMO) -->
|
||||
<div class="login-demo-box">
|
||||
<div class="login-demo-title">Accesos Rápidos de Prueba:</div>
|
||||
<div class="login-demo-btns">
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('dev', 'dev123')" style="border: 1.5px solid #0284c7; background: #f0f9ff;">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#0284c7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>
|
||||
<span style="color: #0284c7; font-weight: 800;">Developer</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('admin', 'admin123')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<span>Admin Soda</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('cajero', 'cajero123')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="5" rx="2"/><line x1="2" x2="22" y1="10" y2="10"/></svg>
|
||||
<span>Cajero</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('padre', 'padre123')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
|
||||
<span>Padre</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('mateo', '1234')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>Mateo (2°)</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('sofia', '1234')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>Sofía (3°)</span>
|
||||
</button>
|
||||
</div>
|
||||
<div style="text-align: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid #f1f5f9;">
|
||||
<a href="/" style="display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 800; color: #0284c7; text-decoration: none; padding: 6px 14px; border-radius: 9999px; background: #e0f2fe; transition: all 0.2s;">
|
||||
<span>🌐 Ver Presentación Web de SiboPay ↗</span>
|
||||
</a>
|
||||
<p style="font-size: 0.72rem; color: #64748b; margin-top: 14px; line-height: 1.45;">
|
||||
Al iniciar sesión o registrarte, aceptas nuestros
|
||||
<a href="/terminos" target="_blank" style="color: #0284c7; font-weight: 700; text-decoration: underline;">Términos y Condiciones</a>
|
||||
y nuestra
|
||||
<a href="/privacidad" target="_blank" style="color: #0284c7; font-weight: 700; text-decoration: underline;">Política de Privacidad</a>.
|
||||
<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>
|
||||
|
||||
<!-- MODAL INFORMATIVO DE TÉRMINOS Y CONDICIONES -->
|
||||
<div id="modalTerminosSiboPay" class="modal-overlay" style="display: none; z-index: 10001;" onclick="closeTerminosModal(event)">
|
||||
<div class="modal-card" style="max-width: 500px; max-height: 85vh; display: flex; flex-direction: column;" onclick="event.stopPropagation()">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e2e8f0; padding-bottom: 12px; margin-bottom: 14px;">
|
||||
<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 style="margin: 0; font-size: 1.15rem; font-weight: 800; color: #0f172a;">Términos y Condiciones</h3>
|
||||
</div>
|
||||
<button type="button" onclick="closeTerminosModal()" style="background: #f1f5f9; border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-weight: 800;">✕</button>
|
||||
</div>
|
||||
<div style="overflow-y: auto; padding-right: 6px; font-size: 0.85rem; color: #334155; line-height: 1.6;">
|
||||
<p><strong>1. Uso de SiboPay:</strong> SiboPay es una plataforma de monedero estudiantil y pagos digitales para sodas y comedores escolares. El uso de la cuenta es personal e intransferible.</p>
|
||||
<p><strong>2. Recargas SINPE Móvil:</strong> Las recargas se realizan vía SINPE Móvil oficial. El monto transferido debe coincidir exactamente con el monto seleccionado en el sistema y debe incluirse el código de referencia que inicia con <code>SIBO-</code> para su correcta acreditación.</p>
|
||||
<p><strong>3. Carné Estudiantil y QR:</strong> Los estudiantes utilizan su carné escolar o código QR para realizar compras en la soda escolar de acuerdo con el saldo disponible asignado por sus padres o encargados.</p>
|
||||
<p><strong>4. Privacidad y Seguridad:</strong> La información personal se encuentra protegida y encriptada, utilizándose únicamente para la gestión de compras y saldos escolares.</p>
|
||||
<div style="margin-top: 14px; text-align: center;">
|
||||
<a href="/terminos" target="_blank" style="color: #0284c7; font-weight: 700; text-decoration: underline; margin-right: 12px;">Ver Términos Completos ↗</a>
|
||||
<a href="/privacidad" target="_blank" style="color: #0284c7; font-weight: 700; text-decoration: underline;">Política de Privacidad ↗</a>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 16px; pt: 12px; border-top: 1px solid #e2e8f0; text-align: right;">
|
||||
<button type="button" onclick="closeTerminosModal()" class="btn-primary" style="padding: 8px 20px; font-size: 0.88rem; border-radius: 10px;">Entendido</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PANEL MASTER DEVELOPER (#viewDeveloper) -->
|
||||
<div id="viewDeveloper" class="dev-container" style="display: none;">
|
||||
<!-- CABECERA DE DEVELOPER -->
|
||||
|
||||
+66
-22
@@ -196,7 +196,8 @@ function showLoginView() {
|
||||
if (appContainer) appContainer.style.display = 'none';
|
||||
if (bottomNav) bottomNav.style.display = 'none';
|
||||
|
||||
switchLoginTab('login');
|
||||
closeLoginSheet();
|
||||
switchSheetView('login');
|
||||
closeScanChildQrModal();
|
||||
closeAdminScanQrModal();
|
||||
toggleParentPanel(false);
|
||||
@@ -205,26 +206,65 @@ function showLoginView() {
|
||||
closeTransferModal();
|
||||
}
|
||||
|
||||
function switchLoginTab(tab) {
|
||||
const formLogin = document.getElementById('formLogin');
|
||||
const formRegister = document.getElementById('formRegisterPadre');
|
||||
const tabLogin = document.getElementById('tabBtnLogin');
|
||||
const tabReg = document.getElementById('tabBtnRegister');
|
||||
const demoBox = document.querySelector('.login-demo-box');
|
||||
|
||||
if (tab === 'login') {
|
||||
if (formLogin) formLogin.style.display = 'block';
|
||||
if (formRegister) formRegister.style.display = 'none';
|
||||
if (tabLogin) tabLogin.classList.add('active');
|
||||
if (tabReg) tabReg.classList.remove('active');
|
||||
if (demoBox) demoBox.style.display = 'block';
|
||||
// ==========================================================================
|
||||
// CONTROL DEL NUEVO DISEÑO DE LOGIN (SPLASH SCREEN & BOTTOM SHEET)
|
||||
// ==========================================================================
|
||||
function openLoginSheet(view = 'login') {
|
||||
const sheet = document.getElementById('loginBottomSheet');
|
||||
if (sheet) {
|
||||
sheet.classList.add('open');
|
||||
switchSheetView(view);
|
||||
setTimeout(() => {
|
||||
if (view === 'login') {
|
||||
const input = document.getElementById('loginUsername');
|
||||
if (input) input.focus();
|
||||
} else {
|
||||
if (formLogin) formLogin.style.display = 'none';
|
||||
if (formRegister) formRegister.style.display = 'block';
|
||||
if (tabLogin) tabLogin.classList.remove('active');
|
||||
if (tabReg) tabReg.classList.add('active');
|
||||
if (demoBox) demoBox.style.display = 'none';
|
||||
const input = document.getElementById('regNombre');
|
||||
if (input) input.focus();
|
||||
}
|
||||
}, 280);
|
||||
}
|
||||
}
|
||||
|
||||
function closeLoginSheet(e) {
|
||||
if (e && e.target && !e.target.classList.contains('bottom-sheet-backdrop') && !e.target.classList.contains('bottom-sheet-close-btn')) {
|
||||
return;
|
||||
}
|
||||
const sheet = document.getElementById('loginBottomSheet');
|
||||
if (sheet) sheet.classList.remove('open');
|
||||
}
|
||||
|
||||
function switchSheetView(view) {
|
||||
const loginContent = document.getElementById('sheetContentLogin');
|
||||
const registerContent = document.getElementById('sheetContentRegister');
|
||||
const title = document.getElementById('bottomSheetTitle');
|
||||
|
||||
if (view === 'register') {
|
||||
if (loginContent) loginContent.style.display = 'none';
|
||||
if (registerContent) registerContent.style.display = 'block';
|
||||
if (title) title.textContent = 'Registro de Padres';
|
||||
} else {
|
||||
if (loginContent) loginContent.style.display = 'block';
|
||||
if (registerContent) registerContent.style.display = 'none';
|
||||
if (title) title.textContent = 'Iniciar Sesión';
|
||||
}
|
||||
}
|
||||
|
||||
function openTerminosModal() {
|
||||
const modal = document.getElementById('modalTerminosSiboPay');
|
||||
if (modal) modal.style.display = 'flex';
|
||||
}
|
||||
|
||||
function closeTerminosModal(e) {
|
||||
if (e && e.target && !e.target.classList.contains('modal-overlay') && e.target.tagName !== 'BUTTON') {
|
||||
return;
|
||||
}
|
||||
const modal = document.getElementById('modalTerminosSiboPay');
|
||||
if (modal) modal.style.display = 'none';
|
||||
}
|
||||
|
||||
function switchLoginTab(tab) {
|
||||
switchSheetView(tab);
|
||||
}
|
||||
|
||||
let currentLoginRole = 'padre';
|
||||
@@ -406,6 +446,7 @@ async function applyUserRoleSession() {
|
||||
const navPadres = document.getElementById('pwaNavPadres');
|
||||
|
||||
if (viewLogin) viewLogin.style.display = 'none';
|
||||
closeLoginSheet();
|
||||
|
||||
if (currentUser.rol === 'developer') {
|
||||
if (viewDeveloper) viewDeveloper.style.display = 'block';
|
||||
@@ -8013,6 +8054,9 @@ async function exportarEstudiantesCsv() {
|
||||
}
|
||||
window.exportarEstudiantesCsv = exportarEstudiantesCsv;
|
||||
|
||||
|
||||
|
||||
|
||||
// Exportación global para eventos de la interfaz de login moderna
|
||||
window.openLoginSheet = openLoginSheet;
|
||||
window.closeLoginSheet = closeLoginSheet;
|
||||
window.switchSheetView = switchSheetView;
|
||||
window.openTerminosModal = openTerminosModal;
|
||||
window.closeTerminosModal = closeTerminosModal;
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
<!-- ==========================================================================
|
||||
PLANTILLA DE RESPALDO: DISEÑO DE LOGIN CLÁSICO CON ROLES (PADRE / ESTUDIANTE / PERSONAL)
|
||||
Guardado: 07-Oct-2026
|
||||
Para reactivar este diseño en el futuro, copia este bloque en #viewLogin dentro de public/index.html
|
||||
========================================================================== -->
|
||||
|
||||
<div id="viewLoginClassicCard" class="login-card">
|
||||
<div class="login-brand">
|
||||
<div class="login-logo" style="margin-bottom: 6px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay Logo" style="width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(2, 132, 199, 0.3)); display: inline-block;">
|
||||
</div>
|
||||
<h1 class="login-title" style="margin: 0; font-size: 1.85rem; font-weight: 900; letter-spacing: -0.5px;">Sibo<strong style="color: #0284c7;">Pay</strong></h1>
|
||||
<p class="login-subtitle">Sistema Digital de Pagos y Monedero Estudiantil</p>
|
||||
</div>
|
||||
|
||||
<!-- SELECTOR ENTRE INICIO DE SESIÓN Y REGISTRO -->
|
||||
<div class="login-tabs">
|
||||
<button type="button" class="login-tab-btn active" id="tabBtnLogin" onclick="switchLoginTab('login')" style="display: inline-flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/></svg>
|
||||
<span>Iniciar Sesión</span>
|
||||
</button>
|
||||
<button type="button" class="login-tab-btn" id="tabBtnRegister" onclick="switchLoginTab('register')" style="display: inline-flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="7" r="3.5"/><path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/><circle cx="17.5" cy="7.5" r="2.5"/><path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/></svg>
|
||||
<span>Registro de Padres</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- FORMULARIO 1: INICIAR SESIÓN CON SELECTOR DE ROL -->
|
||||
<form id="formLogin" onsubmit="handleLoginSubmit(event)">
|
||||
<div class="login-role-selector-wrap">
|
||||
<label style="font-size: 0.74rem; font-weight: 900; color: #475569; text-transform: uppercase; letter-spacing: 0.6px; display: block; margin-bottom: 8px;">¿Quién eres?</label>
|
||||
<div class="login-role-grid">
|
||||
<div onclick="selectLoginRole('padre')" id="loginRoleCardPadre" class="login-role-card selected">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="9" cy="7" r="3.5"/>
|
||||
<path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/>
|
||||
<circle cx="17.5" cy="7.5" r="2.5"/>
|
||||
<path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Padre</span>
|
||||
<span class="login-role-desc">o Encargado</span>
|
||||
</div>
|
||||
|
||||
<div onclick="selectLoginRole('estudiante')" id="loginRoleCardEstudiante" class="login-role-card">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1-2.5-2.5Z"/>
|
||||
<path d="M6 6h10"/>
|
||||
<path d="M6 10h10"/>
|
||||
<circle cx="12" cy="15" r="2"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Estudiante</span>
|
||||
<span class="login-role-desc">Carné QR</span>
|
||||
</div>
|
||||
|
||||
<div onclick="selectLoginRole('personal')" id="loginRoleCardPersonal" class="login-role-card">
|
||||
<div class="login-role-icon">
|
||||
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M6 13.8V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v9.8"/>
|
||||
<path d="M4 13.8h16a1 1 0 0 1 1 1V20a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5.2a1 1 0 0 1 1-1Z"/>
|
||||
<line x1="10" y1="18" x2="14" y2="18"/>
|
||||
</svg>
|
||||
</div>
|
||||
<span class="login-role-name">Personal</span>
|
||||
<span class="login-role-desc">Soda / Caja</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label id="lblLoginUser" for="loginUsername">Usuario o Teléfono del Padre:</label>
|
||||
<input type="text" id="loginUsername" class="login-input" placeholder="Ej: padre, carlos_papa o 8888-1122" required autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label id="lblLoginPass" for="loginPassword">Contraseña:</label>
|
||||
<input type="password" id="loginPassword" class="login-input" placeholder="••••••••" required autocomplete="current-password">
|
||||
</div>
|
||||
|
||||
<div id="loginErrorMsg" style="display: none; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; padding: 8px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; margin-bottom: 12px; text-align: center;"></div>
|
||||
|
||||
<button type="submit" id="btnLoginSubmit" class="login-submit-btn" style="display: flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" x2="3" y1="12" y2="12"/></svg>
|
||||
<span id="lblBtnLoginText">Ingresar como Padre / Encargado</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!-- FORMULARIO 2: REGISTRO DE NUEVOS PADRES -->
|
||||
<form id="formRegisterPadre" onsubmit="handleRegisterPadreSubmit(event)" style="display: none;">
|
||||
<div style="background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); border: 1.5px solid #bae6fd; border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);">
|
||||
<div style="width: 44px; height: 44px; border-radius: 12px; background: white; border: 1.5px solid #bae6fd; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12); padding: 5px;">
|
||||
<img src="/img/sibopay-emblem.png" alt="SiboPay" style="width: 100%; height: 100%; object-fit: contain;">
|
||||
</div>
|
||||
<div>
|
||||
<strong style="color: #0369a1; font-size: 0.92rem; display: block; font-weight: 800; letter-spacing: -0.2px;">Registro de Padres o Encargados</strong>
|
||||
<span style="font-size: 0.74rem; color: #475569; line-height: 1.35; display: block; margin-top: 2px;">Crea tu cuenta oficial en SiboPay para vincular a tus hijos y recargarles saldo escolar.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regNombre">Nombre y Apellidos:</label>
|
||||
<input type="text" id="regNombre" class="login-input" placeholder="Ej: Carlos Alvarado Castro" required autocomplete="name">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regTelefono">Teléfono o Celular (para SINPE):</label>
|
||||
<input type="tel" id="regTelefono" class="login-input" placeholder="Ej: 8888-1122" required autocomplete="tel">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regEmail">Correo Electrónico <span style="font-size: 0.75rem; font-weight: 600; color: #64748b;">(Opcional)</span>:</label>
|
||||
<input type="email" id="regEmail" class="login-input" placeholder="Ej: [email protected]" autocomplete="email">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regUsername">Nombre de Usuario:</label>
|
||||
<input type="text" id="regUsername" class="login-input" placeholder="Ej: carlos_papa" required autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="login-form-group">
|
||||
<label for="regPassword">Contraseña:</label>
|
||||
<input type="password" id="regPassword" class="login-input" placeholder="Mínimo 4 caracteres" required autocomplete="new-password">
|
||||
</div>
|
||||
|
||||
<div id="registerErrorMsg" style="display: none; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; padding: 8px 12px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; margin-bottom: 12px; text-align: center;"></div>
|
||||
|
||||
<button type="submit" id="btnRegisterSubmit" class="login-submit-btn" style="display: flex; align-items: center; justify-content: center; gap: 8px;">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="7" r="3.5"/><path d="M3 20v-1.5A4.5 4.5 0 0 1 7.5 14h3A4.5 4.5 0 0 1 15 18.5V20"/><circle cx="17.5" cy="7.5" r="2.5"/><path d="M15 14a3.5 3.5 0 0 1 5.5 3v3"/></svg>
|
||||
<span>Crear Cuenta de Padre y Entrar</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!-- ACCESOS RÁPIDOS DE PRUEBA (1-CLICK DEMO) -->
|
||||
<div class="login-demo-box">
|
||||
<div class="login-demo-title">Accesos Rápidos de Prueba:</div>
|
||||
<div class="login-demo-btns">
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('dev', 'dev123')" style="border: 1.5px solid #0284c7; background: #f0f9ff;">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#0284c7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>
|
||||
<span style="color: #0284c7; font-weight: 800;">Developer</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('admin', 'admin123')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<span>Admin Soda</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('cajero', 'cajero123')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="14" x="2" y="5" rx="2"/><line x1="2" x2="22" y1="10" y2="10"/></svg>
|
||||
<span>Cajero</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('padre', 'padre123')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
|
||||
<span>Padre</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('mateo', '1234')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>Mateo (2°)</span>
|
||||
</button>
|
||||
<button type="button" class="login-demo-btn" onclick="quickFillLogin('sofia', '1234')">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>Sofía (3°)</span>
|
||||
</button>
|
||||
</div>
|
||||
<div style="text-align: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid #f1f5f9;">
|
||||
<a href="/" style="display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 800; color: #0284c7; text-decoration: none; padding: 6px 14px; border-radius: 9999px; background: #e0f2fe; transition: all 0.2s;">
|
||||
<span>🌐 Ver Presentación Web de SiboPay ↗</span>
|
||||
</a>
|
||||
<p style="font-size: 0.72rem; color: #64748b; margin-top: 14px; line-height: 1.45;">
|
||||
Al iniciar sesión o registrarte, aceptas nuestros
|
||||
<a href="/terminos" target="_blank" style="color: #0284c7; font-weight: 700; text-decoration: underline;">Términos y Condiciones</a>
|
||||
y nuestra
|
||||
<a href="/privacidad" target="_blank" style="color: #0284c7; font-weight: 700; text-decoration: underline;">Política de Privacidad</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
# Catálogo de Pantallas de Inicio de Sesión de SiboPay
|
||||
|
||||
Este documento actúa como la **memoria y registro de versiones** de pantallas de inicio de sesión de SiboPay. Cada diseño está preservado en código para que pueda ser reactivado cuando el administrador o el usuario lo solicite.
|
||||
|
||||
---
|
||||
|
||||
## 🎨 Opción 1: Clásico con Selector de Roles (Padre, Estudiante, Personal)
|
||||
- **Archivo de Respaldo:** `public/templates/login-classic-roles.html`
|
||||
- **Estilo:** Tarjeta flotante central sobre fondo neutro con efecto blur.
|
||||
- **Características:**
|
||||
- Selector de pestaña superior: "Iniciar Sesión" y "Registro de Padres".
|
||||
- Selector visual interactivo "¿Quién eres?":
|
||||
- **Padre o Encargado** (ícono de familia)
|
||||
- **Estudiante Carné QR** (ícono de libreta/carné)
|
||||
- **Personal Soda / Caja** (ícono de local de comida/caja)
|
||||
- Formularios dinámicos que cambian placeholders y etiquetas según el rol seleccionado.
|
||||
- Accesos rápidos demo de 1-clic integrados en la tarjeta.
|
||||
- **Cómo restaurarlo:**
|
||||
Reemplazar el contenido de `<div id="viewLogin">` en `public/index.html` con el código almacenado en `public/templates/login-classic-roles.html`.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Opción 2: Minimalista Splash & Bottom Sheet (Estilo OrderEAT / SiboPay)
|
||||
- **Archivo de Implementación:** `public/index.html` (dentro de `#viewLogin`)
|
||||
- **Estilo:** Pantalla completa en degradado celeste oficial (`#0284c7` a `#0369a1`) con marca de agua difuminada de siluetas de comida (ollas, brócoli, manzanas, cubiertos).
|
||||
- **Características:**
|
||||
- Emblema central de SiboPay con aura translúcida y título blanco de alta legibilidad.
|
||||
- Eslogan institucional "Sistema Digital de Pagos y Monedero Estudiantil".
|
||||
- Botón principal tipo píldora blanca sólida: **"Iniciar Sesión"**.
|
||||
- Botón secundario translúcido con borde blanco: **"Registrarse"**.
|
||||
- Al pie absoluto de la pantalla: Enlace a **Términos y Condiciones** que abre un modal emergente rápido.
|
||||
- **Interacción fluida (Bottom Sheet):** Al presionar Iniciar Sesión o Registrarse, se despliega suavemente desde abajo una ventana moderna con los formularios, sin tapar abruptamente la identidad visual de la aplicación.
|
||||
- El sistema detecta el rol automáticamente al validar credenciales contra `/api/auth/login`.
|
||||
|
||||
---
|
||||
|
||||
*Fecha de registro: 07 de Octubre de 2026*
|
||||
Reference in New Issue
Block a user