File size: 14,463 Bytes
508b0ac 7a5c7ac 508b0ac 7a5c7ac 508b0ac 7a5c7ac 508b0ac 7a5c7ac 508b0ac 7a5c7ac 508b0ac 7a5c7ac 508b0ac | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | <!DOCTYPE html>
<html lang="pt-BR" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Entrar | Agenda+</title>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>📅</text></svg>">
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
primary: {
50: '#f0f9ff',
100: '#e0f2fe',
200: '#bae6fd',
300: '#7dd3fc',
400: '#38bdf8',
500: '#0ea5e9',
600: '#0284c7',
700: '#0369a1',
800: '#075985',
900: '#0c4a6e',
}
}
}
}
}
</script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
body {
font-family: 'Inter', sans-serif;
}
.auth-container {
min-height: 100vh;
}
.auth-bg {
background-image: url('http://static.photos/medical/1200x630/1');
background-size: cover;
background-position: center;
}
.auth-bg-overlay {
background: rgba(14, 165, 233, 0.8);
background: linear-gradient(135deg, rgba(14, 165, 233, 0.9) 0%, rgba(124, 58, 237, 0.9) 100%);
}
.toggle-checkbox:checked {
right: 0;
border-color: #0ea5e9;
}
.toggle-checkbox:checked + .toggle-label {
background-color: #0ea5e9;
}
</style>
</head>
<body class="bg-gray-50 dark:bg-gray-900">
<div class="flex flex-col md:flex-row auth-container">
<!-- Left Column - Form -->
<div class="w-full md:w-1/2 flex items-center justify-center p-8">
<div class="w-full max-w-md">
<div class="flex justify-center mb-8">
<div class="flex items-center">
<span class="text-3xl mr-2">📅</span>
<span class="text-2xl font-bold text-primary-600 dark:text-primary-400">Agenda+</span>
</div>
</div>
<div class="text-center mb-8">
<h1 class="text-2xl font-bold text-gray-800 dark:text-white">Bem-vindo de volta</h1>
<p class="mt-2 text-gray-600 dark:text-gray-400">Entre na sua conta para continuar</p>
</div>
<div class="bg-white dark:bg-gray-800 shadow rounded-lg p-8">
<form class="space-y-6" id="loginForm">
<div>
<label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">E-mail</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="mail" class="h-5 w-5 text-gray-400"></i>
</div>
<input id="email" name="email" type="email" autocomplete="email" required class="pl-10 block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white" placeholder="seu@email.com">
</div>
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Senha</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="lock" class="h-5 w-5 text-gray-400"></i>
</div>
<input id="password" name="password" type="password" autocomplete="current-password" required class="pl-10 block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white" placeholder="••••••••">
</div>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input id="remember-me" name="remember-me" type="checkbox" class="h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 dark:border-gray-600 rounded dark:bg-gray-700">
<label for="remember-me" class="ml-2 block text-sm text-gray-700 dark:text-gray-300">Lembrar de mim</label>
</div>
<div class="text-sm">
<a href="/forgot-password" class="font-medium text-primary-600 hover:text-primary-500 dark:text-primary-400 dark:hover:text-primary-300">Esqueceu sua senha?</a>
</div>
</div>
<div>
<button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500" id="loginButton">
Entrar
<span id="loginSpinner" class="hidden ml-2">
<i data-feather="loader" class="animate-spin h-4 w-4"></i>
</span>
</button>
</div>
</form>
<div class="mt-6">
<div class="relative">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-gray-300 dark:border-gray-600"></div>
</div>
<div class="relative flex justify-center text-sm">
<span class="px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400">Ou continue com</span>
</div>
</div>
<div class="mt-6 grid grid-cols-2 gap-3">
<div>
<a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm bg-white dark:bg-gray-700 text-sm font-medium text-gray-500 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600">
<i data-feather="facebook" class="h-5 w-5 mr-2"></i>
Facebook
</a>
</div>
<div>
<a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm bg-white dark:bg-gray-700 text-sm font-medium text-gray-500 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600">
<i data-feather="mail" class="h-5 w-5 mr-2"></i>
Gmail
</a>
</div>
</div>
</div>
<div class="mt-6 text-center">
<p class="text-sm text-gray-600 dark:text-gray-400">
Não tem uma conta?
<a href="/register" class="font-medium text-primary-600 hover:text-primary-500 dark:text-primary-400 dark:hover:text-primary-300">Cadastre-se</a>
</p>
</div>
</div>
<div class="mt-8 text-center">
<div class="relative inline-block w-10 mr-2 align-middle select-none">
<input type="checkbox" name="toggle" id="toggle" class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"/>
<label for="toggle" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
</div>
<span class="text-sm text-gray-500 dark:text-gray-400">Modo Escuro</span>
</div>
</div>
</div>
<!-- Right Column - Image -->
<div class="hidden md:block md:w-1/2 auth-bg">
<div class="flex items-center justify-center h-full auth-bg-overlay p-12">
<div class="text-white text-center">
<h2 class="text-3xl font-bold mb-4">Sistema de Agendamento Inteligente</h2>
<p class="text-xl mb-8">Para clínicas e profissionais de saúde</p>
<div class="flex justify-center">
<i data-feather="calendar" class="h-16 w-16"></i>
</div>
</div>
</div>
</div>
</div>
<script>
// Initialize Feather Icons
feather.replace();
// Dark mode toggle
const toggle = document.getElementById('toggle');
// Check for saved user preference, if any, on load of the website
if (localStorage.getItem('darkMode') === 'true') {
document.documentElement.classList.add('dark');
toggle.checked = true;
} else {
document.documentElement.classList.remove('dark');
toggle.checked = false;
}
// Toggle dark mode
toggle.addEventListener('change', function() {
if (this.checked) {
document.documentElement.classList.add('dark');
localStorage.setItem('darkMode', 'true');
} else {
document.documentElement.classList.remove('dark');
localStorage.setItem('darkMode', 'false');
}
});
// Form validation and submission
const loginForm = document.getElementById('loginForm');
const loginButton = document.getElementById('loginButton');
const loginSpinner = document.getElementById('loginSpinner');
loginForm.addEventListener('submit', function(e) {
e.preventDefault();
// Show loading state
loginButton.disabled = true;
loginSpinner.classList.remove('hidden');
feather.replace();
// Get form values
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
const rememberMe = document.getElementById('remember-me').checked;
// Basic validation
if (!email || !password) {
alert('Por favor, preencha todos os campos');
loginButton.disabled = false;
loginSpinner.classList.add('hidden');
return;
}
// Simulate API call (replace with actual fetch)
setTimeout(() => {
console.log('Login attempt with:', {email, password, rememberMe});
// For demo purposes, redirect to dashboard
window.location.href = '/dashboard';
// In a real app, you would use:
/*
fetch('/api/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({email, password, rememberMe})
})
.then(response => response.json())
.then(data => {
if (data.success) {
if (data.requires2FA) {
window.location.href = '/verify-2fa';
} else {
window.location.href = '/dashboard';
}
} else {
alert(data.message || 'Login falhou');
}
})
.catch(error => {
console.error('Error:', error);
alert('Erro ao conectar com o servidor');
})
.finally(() => {
loginButton.disabled = false;
loginSpinner.classList.add('hidden');
});
*/
}, 1500);
});
// Social login handlers
document.querySelectorAll('.social-login').forEach(link => {
link.addEventListener('click', function(e) {
e.preventDefault();
const provider = this.getAttribute('data-provider');
console.log(`Social login with ${provider}`);
// In a real app, you would redirect to:
// window.location.href = `/auth/${provider}`;
// For demo, show alert
alert(`Redirecionando para login com ${provider}`);
});
});
</script>
</body>
</html>
|