<?php
session_start();

// यदि पहले से लॉगिन है, तो डैशबोर्ड पर भेजें
if (isset($_SESSION['admin_id'])) {
    header("Location: dashboard.php");
    exit;
}
?>
<!DOCTYPE html>
<html lang="hi">
<head>
<meta charset="UTF-8">
<title>एडमिन लॉगिन</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- ✅ SOURCE SANS PRO FONT -->
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700&display=swap" rel="stylesheet">

<style>
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:'Source Sans Pro', sans-serif !important;
  color:black !important;
}

body{
  min-height:100vh;
  background: linear-gradient(135deg, #80d9ff, #1c2e3a);
  display:flex;
  align-items:center;
  justify-content:center;
}

.login-card{
  width:420px;
  padding:40px 35px;
  background:rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  border-radius:16px;
  box-shadow:0 20px 50px rgba(0,0,0,0.5);
  color:#fff;
}

.login-card h2{
  text-align:center;
  margin-bottom:30px;
  font-weight:600;
  letter-spacing:1px;
}

.input-group{
  margin-bottom:22px;
}

.input-group label{
  display:block;
  font-size:14px;
  margin-bottom:6px;
  color:#ddd;
}

.input-group input{
  width:100%;
  padding:12px 10px;
  background:transparent;
  border:1px solid rgb(0, 0, 0);
  border-radius:8px;
  color:#fff;
  font-size:14px;
  outline:none;
}

.input-group input::placeholder{
  color:#bbb;
}

.input-group input:focus{
  border-color:#00c6ff;
  box-shadow:0 0 8px rgba(0,198,255,0.4);
}

.login-btn{
  width:100%;
  margin-top:10px;
  padding:12px;
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  border:none;
  border-radius:30px;
  color:#fff;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:0.3s;
}

.login-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(0,114,255,0.5);
}

.error{
  background:rgba(255,0,0,0.15);
  color:black;
  padding:10px;
  border-radius:8px;
  text-align:center;
  margin-bottom:20px;
  font-size:14px;
}
</style>
</head>

<body>

<div class="login-card">
  
  <h2>एडमिन पैनल</h2>

  <?php if (isset($_GET['error'])): ?>
    <div class="error">ईमेल या पासवर्ड गलत है</div>
  <?php endif; ?>

  <form method="POST" action="login_check.php">

    <div class="input-group">
      <label>ईमेल पता</label>
      <input type="email" name="email" placeholder="ईमेल दर्ज करें" required>
    </div>

    <div class="input-group">
      <label>पासवर्ड</label>
      <input type="password" name="password" placeholder="पासवर्ड दर्ज करें" required>
    </div>

    <button type="submit" class="login-btn">लॉगिन करें</button>

  </form>
</div>

</body>
</html>
