<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="UTF-8" />
  <title>{{ share_name }} 로그인</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      max-width: 400px;
      margin: 50px auto;
      padding: 20px;
      border: 1px solid #ddd;
      border-radius: 6px;
      background-color: #f9f9f9;
    }
    h1 {
      text-align: center;
      color: #333;
    }
    form {
      display: flex;
      flex-direction: column;
      gap: 15px;
      margin-top: 20px;
    }
    label {
      font-weight: bold;
      color: #555;
    }
    input[type="text"],
    input[type="password"] {
      padding: 8px 10px;
      border: 1px solid #ccc;
      border-radius: 4px;
      font-size: 14px;
    }
    button {
      background-color: #007bff;
      color: white;
      padding: 10px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 16px;
    }
    button:hover {
      background-color: #0056b3;
    }
    ul {
      list-style: none;
      padding: 0;
      margin: 10px 0 0 0;
    }
    li {
      padding: 8px;
      border-radius: 4px;
      margin-bottom: 8px;
    }
    li.danger {
      background-color: #f8d7da;
      color: #721c24;
      border: 1px solid #f5c6cb;
    }
    li.success {
      background-color: #d4edda;
      color: #155724;
      border: 1px solid #c3e6cb;
    }
  </style>
</head>
<body>
  <h1>{{ share_name }} 공유폴더 로그인</h1>

  {% with messages = get_flashed_messages(with_categories=true) %}
    {% if messages %}
      <ul>
        {% for category, message in messages %}
          <li class="{{ category }}">{{ message }}</li>
        {% endfor %}
      </ul>
    {% endif %}
  {% endwith %}

  <form method="POST">
    <label for="username">아이디:</label>
    <input id="username" type="text" name="username" required />

    <label for="password">비밀번호:</label>
    <input id="password" type="password" name="password" required />

    <button type="submit">로그인</button>
  </form>
</body>
</html>
