<!-- login.html -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Login</title>
  <link rel="stylesheet" href="css/login.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">

  <style>	
    @import url(http://fonts.googleapis.com/css?family=Raleway:400,700);
    body {
      background: #7f9b4e url(images/bg2.jpg) no-repeat center top;
      -webkit-background-size: cover;
      -moz-background-size: cover;
      background-size: cover;
    }
    .container > header h1,
    .container > header h2 {
      color: #fff;
      text-shadow: 0 1px 1px rgba(0,0,0,0.7);
    }
    /* Error message styling */
.error-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  background-color: #f44336;
  color: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  animation: slideIn 0.5s, fadeOut 0.5s 2.5s forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
  </style>
</head>
<body>
  
  <!-- Display error message if provided -->

  <section class="main">
    <form class="form-4" id="loginForm">
      <h1>Login or Register</h1>
      <% if (error === 'invalid_credentials') { %>
        <p style="color: red;">Invalid username or Company name or password. Please try again.</p>
      <% } %>
      
      <p>
        <label for="username">Username or email</label>
        <input type="text" id="username" name="username" placeholder="Enter primary contact name or secondary contact name" required>
      </p>
      <p>
        <label for="companyName">Company Name:</label>
        <input type="text" id="companyName" placeholder="Please enter your Company name" name="companyName" required>
      </p>
      <p>
        <label for="password">Password</label>
        <input type="password" id="password" name="password" placeholder="Password" required> 
      </p>
    
      <p>
        <input type="submit" value="Continue">
      </p>       
    </form>​
  </section>
  <script src="js/login.js"></script>
</body>
</html>
