/* assets/css/style.css */

/* Reset + Base */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: url('../img/s1.jpg') no-repeat center center / cover;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Login Box */
.login-box {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.96);
  padding: 40px 32px;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

/* Logo + Title */
.logo img {
  width: 140px;
  margin-bottom: 10px;
}

.title {
  font-size: 22px;
  font-weight: 700;
  margin: 6px 0 2px;
  color: #123;
}

.subtitle {
  font-size: 14px;
  margin-bottom: 26px;
  opacity: 0.8;
  color: #345;
}

/* Form */
.input-group {
  text-align: left;
  margin-bottom: 16px;
}

.input-group label {
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
  color: #333;
}

.input-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus {
  outline: none;
  border-color: #4ac07d;
  box-shadow: 0 0 0 3px rgba(74, 192, 125, 0.18);
}

/* Button */
.login-btn {
  width: 170px;
  padding: 12px;
  margin-top: 12px;
  background: linear-gradient(135deg, #59d98f, #4ac07d);
  border: none;
  border-radius: 26px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.login-btn:active {
  transform: scale(0.98);
}

/* Footer */
.forgot {
  margin-top: 16px;
  font-size: 13px;
  color: #666;
}

/* Flash Messages (รองรับ login.php) */
.msg-container {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.msg-success {
  background: #e6f7f0;
  color: #0a8a5f;
  border: 1px solid #4ac07d;
}

.msg-error {
  background: #ffebeb;
  color: #b00020;
  border: 1px solid #b00020;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .login-box {
    padding: 32px 22px;
    border-radius: 18px;
  }

  .logo img {
    width: 120px;
  }

  .title {
    font-size: 20px;
  }
}
