<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Travel World - Staff Login</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body, html {
      height: 100%;
      font-family: 'Arial', sans-serif;
      background: linear-gradient(135deg, #1e3c72, #2a5298);
      display: flex;
      justify-content: center;
      align-items: center;
      color: #333;
    }

    .login-container {
      width: 400px;
      padding: 40px;
      background: rgba(255, 255, 255, 0.95);
      border-radius: 15px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      text-align: center;
    }

    .login-container h1 {
      font-size: 28px;
      margin-bottom: 20px;
      color: #333;
    }

    .login-container p {
      font-size: 14px;
      margin-bottom: 30px;
      color: #555;
    }

    .login-container input {
      width: 100%;
      padding: 12px 15px;
      margin: 10px 0;
      border: 1px solid #ddd;
      border-radius: 8px;
      font-size: 14px;
      transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

    .login-container input:focus {
      outline: none;
      border-color: #1c3faa;
      box-shadow: 0 0 5px rgba(28, 63, 170, 0.5);
    }

    .login-container button {
      width: 100%;
      padding: 15px;
      font-size: 16px;
      font-weight: bold;
      border: none;
      border-radius: 8px;
      background-color: #1c3faa;
      color: #fff;
      cursor: pointer;
      transition: background-color 0.3s ease, transform 0.2s ease;
    }

    .login-container button:hover {
      background-color: #1a337b;
      transform: scale(1.03);
    }

    .notification {
      margin-top: 20px;
      padding: 15px;
      display: none;
      text-align: center;
      border-radius: 8px;
      font-weight: bold;
      font-size: 14px;
    }

    .notification.success {
      background-color: #4caf50;
      color: #fff;
    }

    .notification.error {
      background-color: #ff4c4c;
      color: #fff;
    }
  </style>
</head>
<body>

  <div class="login-container">
    <h1>Staff Login</h1>
    <p>Enter your credentials to access the dashboard</p>
    <input type="text" id="username" placeholder="Username" autocomplete="username">
    <input type="password" id="password" placeholder="Password" autocomplete="current-password">
    <button onclick="login()">Login</button>

    <div class="notification" id="notification"></div>
  </div>

  <script>
    function login() {
      const username = document.getElementById('username').value.trim();
      const password = document.getElementById('password').value.trim();
      const notification = document.getElementById('notification');

      // Reset notification
      notification.style.display = 'none';

      // Validation
      if (!username || !password) {
        notification.textContent = 'Please fill in both fields.';
        notification.className = 'notification error';
        notification.style.display = 'block';
        return;
      }

      // Authentication Logic
      if (username === 'admin' && password === 'admin1234') {
        notification.textContent = 'Login Successful! Redirecting...';
        notification.className = 'notification success';
        notification.style.display = 'block';

        setTimeout(() => {
          window.location.href = 'staff-dashboard.html'; // Change to your dashboard page
        }, 1500);
      } else {
        notification.textContent = 'Invalid Username or Password!';
        notification.className = 'notification error';
        notification.style.display = 'block';
      }
    }
  </script>

</body>
</html>
