<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Login - 360 EDGE SOLUTIONS</title>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <style>
    *{box-sizing:border-box}body{margin:0;min-height:100vh;font-family:Inter,Segoe UI,Arial,sans-serif;background:radial-gradient(circle at top left,rgba(34,197,94,.35),transparent 32rem),radial-gradient(circle at bottom right,rgba(37,99,235,.23),transparent 34rem),linear-gradient(135deg,#020617 0%,#08311f 55%,#020617 100%);display:grid;place-items:center;padding:20px;color:#fff;overflow-x:hidden}.login-shell{width:min(1080px,100%);display:grid;grid-template-columns:1.1fr .9fr;gap:28px;align-items:stretch}.hero-panel,.login-card{border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.08);backdrop-filter:blur(22px);border-radius:32px;box-shadow:0 30px 80px rgba(0,0,0,.28)}.hero-panel{padding:42px;position:relative;overflow:hidden}.hero-panel:before{content:"";position:absolute;inset:auto -80px -120px auto;width:300px;height:300px;background:radial-gradient(circle,#22c55e,transparent 65%);opacity:.28}.brand{display:flex;align-items:center;gap:14px;margin-bottom:52px}.mark{width:58px;height:58px;border-radius:20px;background:linear-gradient(135deg,#22c55e,#14b8a6);display:grid;place-items:center;font-size:29px;font-weight:900;box-shadow:0 16px 42px rgba(20,184,166,.32)}.brand h1{font-size:20px;line-height:1.05;margin:0;font-weight:950;letter-spacing:-.04em}.brand p{margin:5px 0 0;color:#bbf7d0;font-weight:700;font-size:13px}.hero-title{font-size:46px;line-height:.95;font-weight:950;letter-spacing:-.07em;margin-bottom:16px}.hero-text{color:#d1fae5;font-weight:600;font-size:16px;max-width:520px}.feature-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:35px}.feature{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:18px;padding:16px;font-weight:800;color:#ecfdf5}.feature span{display:block;font-size:24px;margin-bottom:6px}.login-card{padding:34px;display:flex;flex-direction:column;justify-content:center}.login-title{font-weight:950;font-size:30px;letter-spacing:-.05em;margin-bottom:8px}.login-sub{color:#bfdbfe;margin-bottom:24px;font-weight:600}.form-label{font-weight:850;color:#ecfdf5}.form-control{border-radius:16px;border:1px solid rgba(255,255,255,.18);padding:14px 16px;background:rgba(255,255,255,.12);color:white;font-weight:700}.form-control:focus{background:rgba(255,255,255,.16);color:white;border-color:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.18)}.form-control::placeholder{color:#94a3b8}.password-wrap{position:relative}.password-toggle{position:absolute;right:10px;top:50%;transform:translateY(-50%);border:0;background:rgba(255,255,255,.12);color:#fff;border-radius:12px;padding:7px 10px;font-weight:900}.password-wrap .form-control{padding-right:56px}.lock-note{font-size:12px;color:#fde68a;font-weight:800;margin-top:6px}.btn-login{border:0;width:100%;border-radius:16px;padding:14px 18px;background:linear-gradient(135deg,#22c55e,#0f766e);color:white;font-weight:950;box-shadow:0 18px 40px rgba(22,163,74,.25);margin-top:12px}.alert{border-radius:16px;border:1px solid rgba(255,255,255,.16);background:rgba(239,68,68,.16);color:#fecaca;font-weight:700}.small-note{color:#94a3b8;font-size:12px;text-align:center;margin-top:18px;font-weight:700}@media(max-width:850px){.login-shell{grid-template-columns:1fr}.hero-panel{display:none}.login-card{min-height:560px}}@media(max-width:480px){body{padding:12px}.login-card{border-radius:24px;padding:24px}.login-title{font-size:25px}}
  </style>
</head>
<body>
  <main class="login-shell">
    <section class="hero-panel">
      <div class="brand"><div class="mark">◈</div><div><h1>360 EDGE<br>SOLUTIONS</h1><p>Premium Business System</p></div></div>
      <div class="hero-title">Control your orders, stock and profit in one place.</div>
      <p class="hero-text">Professional dashboard for sales, warranty, IMEI tracking, stock alerts, cash book and business reports.</p>
      <div class="feature-grid">
        <div class="feature"><span>📦</span>Stock Control</div>
        <div class="feature"><span>📱</span>IMEI Warranty</div>
        <div class="feature"><span>💵</span>Profit Reports</div>
        <div class="feature"><span>🛡️</span>Daily Backup</div>
      </div>
    </section>
    <section class="login-card">
      <div class="text-center mb-4"><div class="mark mx-auto mb-3">◈</div><div class="login-title">Welcome Back</div><div class="login-sub">Sign in to continue to your control panel</div></div>
      {% with messages = get_flashed_messages() %}
        {% if messages %}
          {% for message in messages %}<div class="alert">{{ message }}</div>{% endfor %}
        {% endif %}
      {% endwith %}
      <form method="POST" autocomplete="off">
        <div class="mb-3"><label class="form-label">Username</label><input class="form-control" type="text" name="username" placeholder="Enter username" required autofocus></div>
        <div class="mb-3"><label class="form-label">Password</label><div class="password-wrap"><input id="loginPassword" class="form-control" type="password" name="password" placeholder="Enter password" required><button type="button" class="password-toggle" onclick="togglePassword('loginPassword', this)">👁️</button></div><div class="lock-note">5 wrong attempts = 15 minute temporary lock</div></div>
        <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
        <button class="btn-login" type="submit">Login Securely</button>
      </form>
      <div class="small-note">Protected business data • Use strong password</div>
    </section>
  </main>
<script>
function togglePassword(inputId, btn){
  const input = document.getElementById(inputId);
  if(!input) return;
  input.type = input.type === 'password' ? 'text' : 'password';
  if(btn) btn.textContent = input.type === 'password' ? '👁️' : '🙈';
}
</script>
</body>
</html>
