File size: 9,833 Bytes
5bde3d5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MediCare ERP | Login</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
        
        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
        }
        
        .medical-bg {
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" fill="none" opacity="0.05"><path d="M50 0L60 20L80 30L60 40L50 60L40 40L20 30L40 20L50 0Z" fill="%23007BFF"/><path d="M20 70L30 50L50 40L70 50L80 70L60 80L50 100L40 80L20 70Z" fill="%23007BFF"/></svg>');
            background-size: 200px;
        }
        
        .login-card {
            box-shadow: 0 10px 25px -5px rgba(0, 123, 255, 0.1);
            transition: all 0.3s ease;
        }
        
        .login-card:hover {
            box-shadow: 0 15px 30px -5px rgba(0, 123, 255, 0.2);
        }
        
        .btn-login {
            background: linear-gradient(135deg, #007BFF 0%, #00BFFF 100%);
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px -1px rgba(0, 123, 255, 0.2);
        }
        
        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 15px -3px rgba(0, 123, 255, 0.3);
        }
        
        .input-field:focus {
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
        }
        
        .error-message {
            animation: fadeIn 0.3s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-5px); }
            to { opacity: 1; transform: translateY(0); }
        }
    </style>
</head>
<body class="medical-bg min-h-screen flex items-center justify-center p-4">
    <div class="login-card bg-white rounded-2xl overflow-hidden w-full max-w-md">
        <div class="bg-gradient-to-r from-blue-500 to-teal-500 p-6 text-white text-center">
            <div class="flex justify-center mb-4">
                <i class="fas fa-hospital text-4xl"></i>
            </div>
            <h1 class="text-2xl font-bold">MediCare ERP</h1>
            <p class="text-blue-100 mt-1">Secure Healthcare Management System</p>
        </div>
        
        <div class="p-8">
            <form id="loginForm" class="space-y-6">
                <div>
                    <label for="username" class="block text-sm font-medium text-gray-700 mb-1">Username</label>
                    <div class="relative">
                        <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                            <i class="fas fa-user text-gray-400"></i>
                        </div>
                        <input type="text" id="username" name="username" 
                               class="input-field pl-10 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 py-3 px-4 border" 
                               placeholder="Enter your username">
                    </div>
                    <div id="usernameError" class="error-message text-red-500 text-xs mt-1 hidden">Please enter your username</div>
                </div>
                
                <div>
                    <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
                    <div class="relative">
                        <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                            <i class="fas fa-lock text-gray-400"></i>
                        </div>
                        <input type="password" id="password" name="password" 
                               class="input-field pl-10 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 py-3 px-4 border" 
                               placeholder="Enter your password">
                    </div>
                    <div id="passwordError" class="error-message text-red-500 text-xs mt-1 hidden">Please enter your password</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-blue-600 focus:ring-blue-500 border-gray-300 rounded">
                        <label for="remember-me" class="ml-2 block text-sm text-gray-700">Remember me</label>
                    </div>
                    
                    <div class="text-sm">
                        <a href="#" class="font-medium text-blue-600 hover:text-blue-500">Forgot password?</a>
                    </div>
                </div>
                
                <div>
                    <button type="submit" class="btn-login w-full flex justify-center py-3 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
                        <i class="fas fa-sign-in-alt mr-2"></i> Login
                    </button>
                </div>
            </form>
            
            <div class="mt-6 text-center">
                <p class="text-sm text-gray-600">
                    New to MediCare ERP? 
                    <a href="#" class="font-medium text-blue-600 hover:text-blue-500">Request access</a>
                </p>
            </div>
        </div>
    </div>

    <script>
        document.getElementById('loginForm').addEventListener('submit', function(e) {
            e.preventDefault();
            
            // Reset error messages
            document.getElementById('usernameError').classList.add('hidden');
            document.getElementById('passwordError').classList.add('hidden');
            
            // Get input values
            const username = document.getElementById('username').value.trim();
            const password = document.getElementById('password').value.trim();
            
            // Validate inputs
            let isValid = true;
            
            if (!username) {
                document.getElementById('usernameError').classList.remove('hidden');
                document.getElementById('username').classList.add('border-red-500');
                isValid = false;
            } else {
                document.getElementById('username').classList.remove('border-red-500');
            }
            
            if (!password) {
                document.getElementById('passwordError').classList.remove('hidden');
                document.getElementById('password').classList.add('border-red-500');
                isValid = false;
            } else {
                document.getElementById('password').classList.remove('border-red-500');
            }
            
            // If valid, proceed with login (simulated)
            if (isValid) {
                // Simulate login process
                const loginBtn = document.querySelector('.btn-login');
                loginBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Authenticating...';
                loginBtn.disabled = true;
                
                // Simulate API call
                setTimeout(() => {
                    // This is just for demo - in a real app you would handle actual authentication
                    alert('Login successful! Redirecting to dashboard...');
                    loginBtn.innerHTML = '<i class="fas fa-sign-in-alt mr-2"></i> Login';
                    loginBtn.disabled = false;
                    
                    // Here you would typically redirect to the dashboard
                    // window.location.href = '/dashboard';
                }, 1500);
            }
        });
        
        // Add input validation on blur
        document.getElementById('username').addEventListener('blur', function() {
            if (!this.value.trim()) {
                document.getElementById('usernameError').classList.remove('hidden');
                this.classList.add('border-red-500');
            } else {
                document.getElementById('usernameError').classList.add('hidden');
                this.classList.remove('border-red-500');
            }
        });
        
        document.getElementById('password').addEventListener('blur', function() {
            if (!this.value.trim()) {
                document.getElementById('passwordError').classList.remove('hidden');
                this.classList.add('border-red-500');
            } else {
                document.getElementById('passwordError').classList.add('hidden');
                this.classList.remove('border-red-500');
            }
        });
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=UnquieCoder/login" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>