Ultra-Premium Redesign of Auth System and critical Map fixes
This commit is contained in:
@ -25,7 +25,6 @@ const handleLogin = async () => {
|
||||
try {
|
||||
await authStore.login(email.value.trim().toLowerCase(), password.value, keepSession.value)
|
||||
|
||||
// Al iniciar sesión, el store ya tiene el rol. Redirigir según corresponda.
|
||||
const role = (authStore.role || 'PASSENGER').toUpperCase()
|
||||
if (role === 'ADMIN') router.push('/admin')
|
||||
else if (role === 'DRIVER') router.push('/driver')
|
||||
@ -46,252 +45,288 @@ const handleLogin = async () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="login-form">
|
||||
<form @submit.prevent="handleLogin" class="form-container">
|
||||
<!-- Email -->
|
||||
<div class="field">
|
||||
<label class="field-label">{{ t('auth.emailLabel') }}</label>
|
||||
<div class="input-wrap">
|
||||
<span class="material-icons input-icon">alternate_email</span>
|
||||
<input
|
||||
v-model="email"
|
||||
type="email"
|
||||
:placeholder="t('auth.emailPlaceholder')"
|
||||
required
|
||||
class="field-input"
|
||||
/>
|
||||
<div class="login-form-content">
|
||||
<form @submit.prevent="handleLogin" class="premium-form">
|
||||
<!-- Welcome Text (Mobile-ish) -->
|
||||
<div class="welcome-header">
|
||||
<h2>{{ t('auth.loginTab') }}</h2>
|
||||
<p>Bienvenido de vuelta a SIBU</p>
|
||||
</div>
|
||||
|
||||
<!-- Input Group -->
|
||||
<div class="input-group">
|
||||
<div class="field-container">
|
||||
<label>{{ t('auth.emailLabel') }}</label>
|
||||
<div class="input-inner">
|
||||
<span class="material-icons i-icon">mail_outline</span>
|
||||
<input
|
||||
v-model="email"
|
||||
type="email"
|
||||
placeholder="tu@correo.com"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field-container">
|
||||
<div class="label-row">
|
||||
<label>{{ t('auth.passLabel') }}</label>
|
||||
</div>
|
||||
<div class="input-inner">
|
||||
<span class="material-icons i-icon">lock_outline</span>
|
||||
<input
|
||||
v-model="password"
|
||||
:type="showPassword ? 'text' : 'password'"
|
||||
placeholder="••••••••"
|
||||
required
|
||||
/>
|
||||
<button type="button" class="eye-btn" @click="showPassword = !showPassword">
|
||||
<span class="material-icons">{{ showPassword ? 'visibility_off' : 'visibility' }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="field">
|
||||
<label class="field-label">{{ t('auth.passLabel') }}</label>
|
||||
<div class="input-wrap">
|
||||
<span class="material-icons input-icon">lock</span>
|
||||
<input
|
||||
v-model="password"
|
||||
:type="showPassword ? 'text' : 'password'"
|
||||
placeholder="••••••••"
|
||||
required
|
||||
class="field-input"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
class="toggle-pw"
|
||||
@click="showPassword = !showPassword"
|
||||
>
|
||||
<span class="material-icons">{{ showPassword ? 'visibility_off' : 'visibility' }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Keep Session -->
|
||||
<div class="options-row">
|
||||
<label class="checkbox-container">
|
||||
<div class="form-options">
|
||||
<label class="custom-checkbox">
|
||||
<input type="checkbox" v-model="keepSession" />
|
||||
<span class="checkmark"></span>
|
||||
<span class="checkbox-label">{{ t('auth.keepSession') }}</span>
|
||||
<span class="cb-text">{{ t('auth.keepSession') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Error Message -->
|
||||
<transition name="shake">
|
||||
<div v-if="errorMessage" class="error-box">
|
||||
<span class="material-icons">error_outline</span>
|
||||
{{ errorMessage }}
|
||||
<!-- Error UI -->
|
||||
<Transition name="shake">
|
||||
<div v-if="errorMessage" class="error-toast">
|
||||
<span class="material-icons">warning_amber</span>
|
||||
<span>{{ errorMessage }}</span>
|
||||
</div>
|
||||
</transition>
|
||||
</Transition>
|
||||
|
||||
<!-- Submit Button -->
|
||||
<button type="submit" class="submit-btn" :disabled="isLoading">
|
||||
<span v-if="isLoading" class="loader"></span>
|
||||
<button type="submit" class="submit-action" :disabled="isLoading">
|
||||
<span v-if="isLoading" class="loader-white"></span>
|
||||
<span v-else>{{ t('auth.loginTab') }}</span>
|
||||
<span v-if="!isLoading" class="material-icons">arrow_forward</span>
|
||||
</button>
|
||||
|
||||
<!-- Switch -->
|
||||
<p class="switch-p">
|
||||
{{ t('auth.noAccount') }}
|
||||
<button type="button" @click="emit('toggle')" class="switch-btn">
|
||||
<div class="switch-footer">
|
||||
<span>{{ t('auth.noAccount') }}</span>
|
||||
<button type="button" @click="emit('toggle')" class="text-link">
|
||||
{{ t('auth.registerHere') }}
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.login-form {
|
||||
padding: 1.5rem 2rem 2rem;
|
||||
.login-form-content {
|
||||
padding: 1.5rem 2rem;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
.premium-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.welcome-header {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.welcome-header h2 {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 800;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.welcome-header p {
|
||||
font-size: 0.9rem;
|
||||
color: rgba(255,255,255,0.5);
|
||||
margin: 0.25rem 0 0;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.field {
|
||||
.field-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.field-label {
|
||||
font-size: 0.75rem;
|
||||
.field-container label {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 700;
|
||||
color: var(--text-secondary);
|
||||
padding-left: 0.5rem;
|
||||
color: rgba(255,255,255,0.6);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
padding-left: 0.25rem;
|
||||
}
|
||||
|
||||
.input-wrap {
|
||||
.input-inner {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.input-icon {
|
||||
.i-icon {
|
||||
position: absolute;
|
||||
left: 1rem;
|
||||
font-size: 1.1rem;
|
||||
color: var(--text-secondary);
|
||||
opacity: 0.7;
|
||||
font-size: 1.25rem;
|
||||
color: rgba(255,255,255,0.4);
|
||||
}
|
||||
|
||||
.field-input {
|
||||
.input-inner input {
|
||||
width: 100%;
|
||||
padding: 0.875rem 1rem 0.875rem 2.75rem;
|
||||
background: var(--bg-primary);
|
||||
border: 1.5px solid var(--border-color);
|
||||
background: rgba(255,255,255,0.05);
|
||||
border: 1.5px solid rgba(255,255,255,0.1);
|
||||
border-radius: 1rem;
|
||||
color: var(--text-primary);
|
||||
padding: 1rem 1rem 1rem 3rem;
|
||||
color: #fff;
|
||||
font-family: inherit;
|
||||
font-size: 0.95rem;
|
||||
font-size: 1rem;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.field-input:focus {
|
||||
.input-inner input:focus {
|
||||
outline: none;
|
||||
background: rgba(255,255,255,0.08);
|
||||
border-color: var(--active-color);
|
||||
box-shadow: 0 0 0 4px rgba(254, 231, 21, 0.1);
|
||||
}
|
||||
|
||||
.toggle-pw {
|
||||
.eye-btn {
|
||||
position: absolute;
|
||||
right: 1rem;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-secondary);
|
||||
color: rgba(255,255,255,0.4);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Checkbox Estilizado */
|
||||
.checkbox-container {
|
||||
/* Checkbox */
|
||||
.custom-checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.checkbox-container input {
|
||||
.custom-checkbox input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.checkmark {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
border: 1.5px solid var(--border-color);
|
||||
background: rgba(255,255,255,0.05);
|
||||
border: 1.5px solid rgba(255,255,255,0.1);
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.checkbox-container input:checked + .checkmark {
|
||||
.custom-checkbox input:checked + .checkmark {
|
||||
background: var(--active-color);
|
||||
border-color: var(--active-color);
|
||||
}
|
||||
|
||||
.checkmark:after {
|
||||
content: "check";
|
||||
font-family: 'Material Icons';
|
||||
content: "";
|
||||
position: absolute;
|
||||
font-size: 0.9rem;
|
||||
color: #101820;
|
||||
left: 6px;
|
||||
top: 2px;
|
||||
width: 5px;
|
||||
height: 10px;
|
||||
border: solid #000;
|
||||
border-width: 0 2px 2px 0;
|
||||
transform: rotate(45deg);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.checkbox-container input:checked + .checkmark:after {
|
||||
.custom-checkbox input:checked + .checkmark:after {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.checkbox-label {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
.cb-text {
|
||||
font-size: 0.9rem;
|
||||
color: rgba(255,255,255,0.7);
|
||||
}
|
||||
|
||||
/* Botones */
|
||||
.submit-btn {
|
||||
/* Submit Action */
|
||||
.submit-action {
|
||||
width: 100%;
|
||||
padding: 1rem;
|
||||
padding: 1.1rem;
|
||||
background: var(--active-color);
|
||||
color: #101820;
|
||||
border: none;
|
||||
border-radius: 1rem;
|
||||
border-radius: 1.25rem;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 800;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
margin-top: 0.5rem;
|
||||
transition: all 0.2s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.75rem;
|
||||
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
.submit-btn:disabled {
|
||||
opacity: 0.6;
|
||||
.submit-action:hover:not(:disabled) {
|
||||
transform: scale(1.02);
|
||||
box-shadow: 0 10px 20px rgba(254, 231, 21, 0.2);
|
||||
}
|
||||
|
||||
.submit-action:active:not(:disabled) {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.submit-action:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.submit-btn:hover:not(:disabled) {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 5px 15px rgba(254, 231, 21, 0.3);
|
||||
}
|
||||
|
||||
.error-box {
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
color: #ef4444;
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
.error-toast {
|
||||
background: rgba(239, 68, 68, 0.15);
|
||||
color: #fb7185;
|
||||
padding: 0.875rem 1rem;
|
||||
border-radius: 1rem;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
gap: 0.75rem;
|
||||
border: 1px solid rgba(239, 68, 68, 0.2);
|
||||
}
|
||||
|
||||
.switch-p {
|
||||
.switch-footer {
|
||||
text-align: center;
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-secondary);
|
||||
margin-top: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
color: rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
.switch-btn {
|
||||
.text-link {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--active-color);
|
||||
font-weight: 800;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
margin-left: 0.25rem;
|
||||
margin-left: 0.5rem;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.loader {
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
border: 2px solid rgba(16, 24, 32, 0.3);
|
||||
border-top-color: #101820;
|
||||
.loader-white {
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
border: 3px solid rgba(0,0,0,0.1);
|
||||
border-top-color: #000;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
@ -34,7 +34,6 @@ const handleRegister = async () => {
|
||||
|
||||
isSuccess.value = true
|
||||
setTimeout(() => {
|
||||
// Redirigir según el rol asignado (usualmente PASSENGER)
|
||||
const role = (authStore.role || 'PASSENGER').toUpperCase()
|
||||
if (role === 'ADMIN') router.push('/admin')
|
||||
else if (role === 'DRIVER') router.push('/driver')
|
||||
@ -56,309 +55,358 @@ const handleRegister = async () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="register-form">
|
||||
<!-- Éxito -->
|
||||
<div v-if="isSuccess" class="success-view">
|
||||
<div class="success-icon-wrap">
|
||||
<div class="register-form-content">
|
||||
<div v-if="isSuccess" class="success-wrap">
|
||||
<div class="glow-circle">
|
||||
<span class="material-icons">check_circle</span>
|
||||
</div>
|
||||
<h3>{{ t('auth.successTitle') }}</h3>
|
||||
<p>{{ t('common.loading') }}</p>
|
||||
<h2>¡Bienvenido!</h2>
|
||||
<p>Tu cuenta ha sido creada exitosamente.</p>
|
||||
<div class="dots-loader">
|
||||
<span></span><span></span><span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Formulario -->
|
||||
<form v-else @submit.prevent="handleRegister" class="form-container">
|
||||
<!-- Full Name -->
|
||||
<div class="field">
|
||||
<label class="field-label">{{ t('auth.fullNameLabel') }}</label>
|
||||
<div class="input-wrap">
|
||||
<span class="material-icons input-icon">person</span>
|
||||
<input
|
||||
v-model="fullName"
|
||||
type="text"
|
||||
:placeholder="t('auth.fullNamePlaceholder')"
|
||||
required
|
||||
class="field-input"
|
||||
/>
|
||||
<form v-else @submit.prevent="handleRegister" class="premium-form">
|
||||
<div class="welcome-header">
|
||||
<h2>{{ t('auth.registerTab') }}</h2>
|
||||
<p>Únete a la nueva red de transporte</p>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<div class="field-container">
|
||||
<label>{{ t('auth.fullNameLabel') }}</label>
|
||||
<div class="input-inner">
|
||||
<span class="material-icons i-icon">badge</span>
|
||||
<input
|
||||
v-model="fullName"
|
||||
type="text"
|
||||
:placeholder="t('auth.fullNamePlaceholder')"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field-container">
|
||||
<label>{{ t('auth.emailLabel') }}</label>
|
||||
<div class="input-inner">
|
||||
<span class="material-icons i-icon">mail_outline</span>
|
||||
<input
|
||||
v-model="email"
|
||||
type="email"
|
||||
placeholder="tu@correo.com"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field-container">
|
||||
<label>{{ t('auth.passLabel') }}</label>
|
||||
<div class="input-inner">
|
||||
<span class="material-icons i-icon">lock_outline</span>
|
||||
<input
|
||||
v-model="password"
|
||||
:type="showPassword ? 'text' : 'password'"
|
||||
:placeholder="t('auth.passMin8')"
|
||||
required
|
||||
minlength="8"
|
||||
/>
|
||||
<button type="button" class="eye-btn" @click="showPassword = !showPassword">
|
||||
<span class="material-icons">{{ showPassword ? 'visibility_off' : 'visibility' }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Email -->
|
||||
<div class="field">
|
||||
<label class="field-label">{{ t('auth.emailLabel') }}</label>
|
||||
<div class="input-wrap">
|
||||
<span class="material-icons input-icon">alternate_email</span>
|
||||
<input
|
||||
v-model="email"
|
||||
type="email"
|
||||
:placeholder="t('auth.emailPlaceholder')"
|
||||
required
|
||||
class="field-input"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="field">
|
||||
<label class="field-label">{{ t('auth.passLabel') }}</label>
|
||||
<div class="input-wrap">
|
||||
<span class="material-icons input-icon">lock</span>
|
||||
<input
|
||||
v-model="password"
|
||||
:type="showPassword ? 'text' : 'password'"
|
||||
:placeholder="t('auth.passMin8')"
|
||||
required
|
||||
minlength="8"
|
||||
class="field-input"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
class="toggle-pw"
|
||||
@click="showPassword = !showPassword"
|
||||
>
|
||||
<span class="material-icons">{{ showPassword ? 'visibility_off' : 'visibility' }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Smart Location -->
|
||||
<div class="options-row">
|
||||
<label class="checkbox-container">
|
||||
<div class="form-options">
|
||||
<label class="custom-checkbox">
|
||||
<input type="checkbox" v-model="autoLocation" />
|
||||
<span class="checkmark"></span>
|
||||
<span class="checkbox-label">{{ t('auth.smartLocation') }}</span>
|
||||
<span class="cb-text">{{ t('auth.smartLocation') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Error Message -->
|
||||
<transition name="shake">
|
||||
<div v-if="errorMessage" class="error-box">
|
||||
<span class="material-icons">error_outline</span>
|
||||
{{ errorMessage }}
|
||||
<!-- Error UI -->
|
||||
<Transition name="shake">
|
||||
<div v-if="errorMessage" class="error-toast">
|
||||
<span class="material-icons">warning_amber</span>
|
||||
<span>{{ errorMessage }}</span>
|
||||
</div>
|
||||
</transition>
|
||||
</Transition>
|
||||
|
||||
<!-- Submit Button -->
|
||||
<button type="submit" class="submit-btn" :disabled="isLoading">
|
||||
<span v-if="isLoading" class="loader"></span>
|
||||
<button type="submit" class="submit-action" :disabled="isLoading">
|
||||
<span v-if="isLoading" class="loader-white"></span>
|
||||
<span v-else>{{ t('auth.registerTab') }}</span>
|
||||
<span v-if="!isLoading" class="material-icons">person_add_alt</span>
|
||||
</button>
|
||||
|
||||
<!-- Switch -->
|
||||
<p class="switch-p">
|
||||
{{ t('auth.hasAccount') }}
|
||||
<button type="button" @click="emit('toggle')" class="switch-btn">
|
||||
<div class="switch-footer">
|
||||
<span>{{ t('auth.hasAccount') }}</span>
|
||||
<button type="button" @click="emit('toggle')" class="text-link">
|
||||
{{ t('auth.loginHere') }}
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.register-form {
|
||||
padding: 1.5rem 2rem 2rem;
|
||||
.register-form-content {
|
||||
padding: 1.5rem 2rem;
|
||||
}
|
||||
|
||||
.success-view {
|
||||
.success-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
padding: 2rem 0;
|
||||
text-align: center;
|
||||
animation: zoomIn 0.4s ease-out;
|
||||
padding: 3rem 0;
|
||||
animation: zoomIn 0.5s ease-out;
|
||||
}
|
||||
|
||||
@keyframes zoomIn {
|
||||
from { opacity: 0; transform: scale(0.9); }
|
||||
to { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
|
||||
.success-icon-wrap {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
.glow-circle {
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
background: rgba(74, 222, 128, 0.1);
|
||||
color: #4ade80;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 1.5rem;
|
||||
box-shadow: 0 0 30px rgba(74, 222, 128, 0.2);
|
||||
}
|
||||
|
||||
.success-icon-wrap .material-icons {
|
||||
font-size: 3.5rem;
|
||||
.glow-circle .material-icons {
|
||||
font-size: 4rem;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
.success-wrap h2 {
|
||||
font-size: 1.75rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.success-wrap p {
|
||||
color: rgba(255,255,255,0.6);
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.dots-loader {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.dots-loader span {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: var(--active-color);
|
||||
border-radius: 50%;
|
||||
animation: dotBlink 1.4s infinite;
|
||||
}
|
||||
|
||||
.dots-loader span:nth-child(2) { animation-delay: 0.2s; }
|
||||
.dots-loader span:nth-child(3) { animation-delay: 0.4s; }
|
||||
|
||||
@keyframes dotBlink {
|
||||
0%, 80%, 100% { opacity: 0; }
|
||||
40% { opacity: 1; }
|
||||
}
|
||||
|
||||
.premium-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.1rem;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.field {
|
||||
.welcome-header h2 {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 800;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.welcome-header p {
|
||||
font-size: 0.9rem;
|
||||
color: rgba(255,255,255,0.5);
|
||||
margin: 0.25rem 0 0;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.field-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.4rem;
|
||||
}
|
||||
|
||||
.field-label {
|
||||
.field-container label {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
color: var(--text-secondary);
|
||||
padding-left: 0.5rem;
|
||||
color: rgba(255,255,255,0.5);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
padding-left: 0.25rem;
|
||||
}
|
||||
|
||||
.input-wrap {
|
||||
.input-inner {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.input-icon {
|
||||
.i-icon {
|
||||
position: absolute;
|
||||
left: 1rem;
|
||||
font-size: 1.1rem;
|
||||
color: var(--text-secondary);
|
||||
opacity: 0.7;
|
||||
font-size: 1.25rem;
|
||||
color: rgba(255,255,255,0.4);
|
||||
}
|
||||
|
||||
.field-input {
|
||||
.input-inner input {
|
||||
width: 100%;
|
||||
padding: 0.8rem 1rem 0.8rem 2.75rem;
|
||||
background: var(--bg-primary);
|
||||
border: 1.5px solid var(--border-color);
|
||||
background: rgba(255,255,255,0.05);
|
||||
border: 1.5px solid rgba(255,255,255,0.1);
|
||||
border-radius: 1rem;
|
||||
color: var(--text-primary);
|
||||
padding: 0.85rem 1rem 0.85rem 3rem;
|
||||
color: #fff;
|
||||
font-family: inherit;
|
||||
font-size: 0.95rem;
|
||||
font-size: 1rem;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.field-input:focus {
|
||||
.input-inner input:focus {
|
||||
outline: none;
|
||||
background: rgba(255,255,255,0.08);
|
||||
border-color: var(--active-color);
|
||||
box-shadow: 0 0 0 4px rgba(254, 231, 21, 0.1);
|
||||
}
|
||||
|
||||
.toggle-pw {
|
||||
.eye-btn {
|
||||
position: absolute;
|
||||
right: 1rem;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-secondary);
|
||||
color: rgba(255,255,255,0.4);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Checkbox Estilizado */
|
||||
.checkbox-container {
|
||||
/* Checkbox */
|
||||
.custom-checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.checkbox-container input {
|
||||
.custom-checkbox input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.checkmark {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
border: 1.5px solid var(--border-color);
|
||||
background: rgba(255,255,255,0.05);
|
||||
border: 1.5px solid rgba(255,255,255,0.1);
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.checkbox-container input:checked + .checkmark {
|
||||
.custom-checkbox input:checked + .checkmark {
|
||||
background: var(--active-color);
|
||||
border-color: var(--active-color);
|
||||
}
|
||||
|
||||
.checkmark:after {
|
||||
content: "check";
|
||||
font-family: 'Material Icons';
|
||||
content: "";
|
||||
position: absolute;
|
||||
font-size: 0.9rem;
|
||||
color: #101820;
|
||||
left: 6px;
|
||||
top: 2px;
|
||||
width: 5px;
|
||||
height: 10px;
|
||||
border: solid #000;
|
||||
border-width: 0 2px 2px 0;
|
||||
transform: rotate(45deg);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.checkbox-container input:checked + .checkmark:after {
|
||||
.custom-checkbox input:checked + .checkmark:after {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.checkbox-label {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.2;
|
||||
.cb-text {
|
||||
font-size: 0.85rem;
|
||||
color: rgba(255,255,255,0.6);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
/* Botones */
|
||||
.submit-btn {
|
||||
/* Submit Action */
|
||||
.submit-action {
|
||||
width: 100%;
|
||||
padding: 1rem;
|
||||
padding: 1.1rem;
|
||||
background: var(--active-color);
|
||||
color: #101820;
|
||||
border: none;
|
||||
border-radius: 1rem;
|
||||
border-radius: 1.25rem;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 800;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
margin-top: 0.5rem;
|
||||
transition: all 0.2s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.75rem;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.submit-btn:disabled {
|
||||
opacity: 0.6;
|
||||
.submit-action:hover:not(:disabled) {
|
||||
transform: scale(1.02);
|
||||
box-shadow: 0 10px 20px rgba(254, 231, 21, 0.2);
|
||||
}
|
||||
|
||||
.submit-action:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.submit-btn:hover:not(:disabled) {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 5px 15px rgba(254, 231, 21, 0.3);
|
||||
}
|
||||
|
||||
.error-box {
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
color: #ef4444;
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
.error-toast {
|
||||
background: rgba(239, 68, 68, 0.15);
|
||||
color: #fb7185;
|
||||
padding: 0.875rem 1rem;
|
||||
border-radius: 1rem;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
gap: 0.75rem;
|
||||
border: 1px solid rgba(239, 68, 68, 0.2);
|
||||
}
|
||||
|
||||
.switch-p {
|
||||
.switch-footer {
|
||||
text-align: center;
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-secondary);
|
||||
margin-top: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
color: rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
.switch-btn {
|
||||
.text-link {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--active-color);
|
||||
font-weight: 800;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
margin-left: 0.25rem;
|
||||
margin-left: 0.5rem;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.loader {
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
border: 2px solid rgba(16, 24, 32, 0.3);
|
||||
border-top-color: #101820;
|
||||
.loader-white {
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
border: 3px solid rgba(0,0,0,0.1);
|
||||
border-top-color: #000;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
@ -375,4 +423,9 @@ const handleRegister = async () => {
|
||||
30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
|
||||
40%, 60% { transform: translate3d(4px, 0, 0); }
|
||||
}
|
||||
|
||||
@keyframes zoomIn {
|
||||
from { opacity: 0; transform: scale(0.9); }
|
||||
to { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user