/* พื้นหลังและ layout */
body.login-wrapper {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #f4f4f4;
}

.login-container {
  max-width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  width: 60vw;
  max-width: 300px;
  height: 20vh;
  margin: -40px auto 10px;
  display: block;
}

/* กล่องใหญ่ */
.login-content {
  display: flex;
  width: 100vw;
  height: 100vh;
  background: white;
  box-shadow: none;      
  border-radius: 0;      
  overflow: hidden;
  margin: 0;                
  padding: 0;
}

/* ซ้าย */
.login-left {
  flex: 5;
  background: #eee;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-left img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

/* ขวา */
.login-right {
  flex: 2;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-left {
  position: relative; /* สำคัญ: ทำให้โลโก้สามารถซ้อนทับได้ */
  flex: 5;
  background: #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.login-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-overlay {
  position: absolute;
  top: 30px;
  left: 30px;
  width: 20vw; /* ปรับขนาดโลโก้ */
  z-index: 10;
}

.logo-overlay img {
  width: 100%;
  height: auto;
}


.login-title {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
}

.login-subtitle {
  color: #666;
  margin-bottom: 1.5rem;
}

.login-form .input-group {
  margin-bottom: 1.2rem;
  width: 95%;
}

.login-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.login-form input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.password-wrapper {
  position: relative;
}

.password-wrapper .toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #666;
}

.btn-login {
  width: 100%;
  padding: 0.75rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  margin-top: 0.5rem;
  cursor: pointer;
}

.btn-login:hover {
  background-color: #0056b3;
}

.guide-text {
  margin-top: 1.2rem;
  text-align: center;
  font-size: 0.95rem;
}

.guide-text a {
  color: #007bff;
  text-decoration: none;
}

.error-text {
  color: red;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .login-content {
    flex-direction: column;
    height: auto;
  }

  .login-left {
    height: 30vh;
  }

  .login-right {
    padding: 2rem;
  }
}
