← back to Rentv 2026

public/admin/pr-intelligence/login.html

46 lines

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sign in — PR Intelligence</title>
<style>
  :root{--ink:#1a2230;--mut:#6b7686;--line:#e4e8ee;--brand:#0b6cff;--bad:#c0392b}
  *{box-sizing:border-box} body{font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;color:var(--ink);background:linear-gradient(160deg,#eef3fb,#f6f8fb);margin:0;min-height:100vh;display:flex;align-items:center;justify-content:center}
  .card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:30px 30px 26px;width:360px;box-shadow:0 10px 40px rgba(20,30,60,.10)}
  .brand{font-weight:800;font-size:15px;letter-spacing:.02em;color:var(--brand);margin:0 0 2px}
  h1{font-size:20px;margin:0 0 20px}
  label{display:block;font-weight:600;font-size:13px;margin:12px 0 5px}
  input{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:9px;font:14px inherit;background:#fbfcfe}
  input:focus{outline:none;border-color:var(--brand);background:#fff}
  .btn{width:100%;margin-top:20px;border:0;border-radius:9px;padding:12px;font:700 15px inherit;background:var(--brand);color:#fff;cursor:pointer}
  .msg{color:var(--bad);font-size:13px;min-height:18px;margin-top:12px;font-weight:600}
</style>
</head>
<body>
  <form class="card" id="f">
    <p class="brand">PR INTELLIGENCE</p>
    <h1>Sign in to your account</h1>
    <label>Email</label>
    <input id="email" type="email" autocomplete="username" placeholder="you@company.com" autofocus>
    <label>Password</label>
    <input id="password" type="password" autocomplete="current-password" placeholder="••••••••">
    <button class="btn" type="submit">Sign in</button>
    <div class="msg" id="msg"></div>
  </form>
<script>
document.getElementById('f').onsubmit=async(e)=>{
  e.preventDefault();
  const msg=document.getElementById('msg'); msg.textContent='';
  try{
    const r=await fetch('/api/pr/auth/login',{method:'POST',credentials:'same-origin',headers:{'Content-Type':'application/json'},
      body:JSON.stringify({email:document.getElementById('email').value,password:document.getElementById('password').value})});
    const j=await r.json();
    if(j.ok){ location.href='/admin/pr-intelligence/'; }
    else msg.textContent=j.error||'Sign in failed';
  }catch(err){ msg.textContent='Sign in failed: '+err.message; }
};
</script>
</body>
</html>