/* รีเซ็ต */
* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background:
    linear-gradient(to bottom, #d3dafb, #fff),  /* พื้นหลังไล่สี */
    url('images/favicon.png');   /* โลโก้ซ้ำ */
  background-repeat: repeat;
  background-size: 120px;
  background-position: center;
  background-attachment: fixed;
  opacity: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/Logo.png');
  background-repeat: repeat;
  background-size: 120px;
  opacity: 0.05;  /* ความโปร่งใส */
  z-index: -1;
}

.container {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
}

h2 { margin-bottom: 20px; color: #333; }

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

input:focus {
  border-color: #007bff;
  outline: none;
}

button[type="submit"] {
  padding: 12px;
  font-size: 1rem;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

button[type="submit"]:hover {
  background: #0056b3;
}

.switch {
  margin-top: 15px;
  font-size: 0.9rem;
}

.switch a {
  color: #007bff;
  text-decoration: none;
}
.switch a:hover { text-decoration: underline; }

/* กำกับ Password*/
.password-hint {
    font-size: 0.85rem;
    color: #777;
    margin-top: 2px;
    margin-bottom: 2px;
  }
  

/* Popup overlay */
.popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.popup-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 8px;
  max-width: 320px;
  text-align: center;
}
.popup-content h2 {
  margin-bottom: 15px;
}
.popup-content p {
  margin-bottom: 15px;
}
.popup-content button {
  padding: 10px 20px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.popup-content button:hover {
  background: #0056b3;
}

/* Responsive */
@media (max-width: 400px) {
  .container { padding: 20px; }
  .popup-content { width: 90%; }
}
