<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Sign-In Alert</title>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
        background-color: #f4f4f4;
    }

    .container {
        max-width: 600px;
        margin: 20px auto;
        padding: 20px;
        background-color: #fff;
        border-radius: 5px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    h1, p {
        text-align: center;
    }

    .user-info {
        margin-bottom: 20px;
    }

    .user-info p {
        margin: 5px 0;
    }

    .button {
        display: inline-block;
        padding: 10px 20px;
        background-color: #007bff;
        color: #fff;
        text-decoration: none;
        border-radius: 5px;
    }

    .button:hover {
        background-color: #0056b3;
    }
</style>
</head>
<body>
<div class="container">
    <h1>User Sign-In Alert</h1>
    <div class="user-info">
        <p><strong>User:</strong><%= username %></p>
        <p><strong>Email:</strong><%= email %></p>
        <p><strong>Department:</strong><%= department %></p>
        <%  const timeZoneOffset = 330; 
        const offsetInMilliseconds = timeZoneOffset * 60 * 1000;
        const adjustedDate = new Date(Date.now() + offsetInMilliseconds)%>
        <p><strong>Time:</strong><%= adjustedDate.toISOString().replace('T',' ') %></p>
    </div>
    <p>A user has attempted to sign in. Please review the details above.</p>
    <p>You can access the admin panel 
        <a href="https://ju-community.vercel.app/admin/panel" class="btn">here</a>
    </p>
</div>
</body>
</html>

