/* 🌿 Outer Wrapper */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #e8f5e8;
  padding: 40px;
}

/* 🌿 Unified Box */
.main-container {
  display: flex;
  width: 100%;
  max-width: 960px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(45, 90, 61, 0.15);
  overflow: hidden;
}

/* 🌿 Image Section */
.image-section {
  flex: 1;
  background: #2d5a3d;
  position: relative;
}
.image-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: center top;
}

/* 🌿 Form Section */
.form-section {
  flex: 1.2;
  padding: 48px;
  background: #f9fdf9;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 🌿 Form Box */
.form-box {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.form-box.hidden {
  display: none !important;
}

/* 🌿 Branding */
.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.logo-icon {
  font-size: 28px;
}
.brand-name {
  font-size: 24px;
  font-weight: 700;
  color: #2d5a3d;
}

/* 🌿 Titles */
.welcome-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2d5a3d;
}
.welcome-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}

/* 🌿 Input Groups */
.input-group {
  margin-bottom: 20px;
}
.input-group label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
  color: #333;
}
.input-group input {
  width: 100%;
  padding: 14px 10px;
  border: 1.5px solid #cce3d8;
  border-radius: 14px;
  font-size: 16px;
  background: #fefefe;
}
.input-group select {
  width: 100%;
  padding: 14px 40px 14px 12px; /* room for arrow */
  border: 1.5px solid #cce3d8;
  border-radius: 14px;
  font-size: 16px;
  background-color: #fefefe;
  color: #333;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23666' d='M5.5 7.5l4.5 5 4.5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
}
.input-group input:focus {
  outline: none;
  border-color: #2d5a3d;
  box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.15);
}
.input-group select:focus {
  outline: none;
  border-color: #2d5a3d;
  box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.15);
}

/* 👁️ Password Toggle */
.password-input-wrapper {
  position: relative;
}
.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: #666;
}

/* 🌿 Buttons */
.sign-in-btn {
  width: 105%;
  padding: 16px;
  background: #2d5a3d;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  margin: 0 auto;

}
.sign-in-btn:hover {
  background: #234a2f;
}

/* 🌿 Divider */
.divider {
  text-align: center;
  margin: 24px 0;
  position: relative;
}
.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}
.divider span {
  background: #fff;
  padding: 0 16px;
  position: relative;
  z-index: 1;
  font-size: 14px;
  color: #666;
}

/* 🌿 Links */
.signup-link {
  text-align: center;
  font-size: 14px;
  color: #666;
}
.signup-link a {
  color: #2d5a3d;
  text-decoration: none;
  font-weight: 600;
}
.signup-link a:hover {
  text-decoration: underline;
}
.forgot-password {
  display: block;
  text-align: right;
  font-size: 14px;
  color: #2d5a3d;
  text-decoration: none;
  margin-bottom: 24px;
}
.forgot-password:hover {
  text-decoration: underline;
}

/* 🌿 Feedback */
.error {
  color: #dc3545;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}
.forgot-link {
  text-align: right;
  margin-top: 5px;
  margin-bottom: 10px;
}
.forgot-link a {
  color: #4CAF50;
  text-decoration: underline;
  font-size: 0.9em;
}
/* --- Modal Overlay --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* semi-transparent background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* --- Modal Content --- */
.modal-content {
  background: #fff;
  padding: 30px 25px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  text-align: center;
  animation: fadeIn 0.3s ease-in-out;
}

/* --- Close Button --- */
.modal-content button[type="button"] {
  margin-top: 15px;
  padding: 8px 20px;
  border: none;
  background: #08624a;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}
.modal-content button[type="button"]:hover {
  background: #003618;
}

/* --- Form Inputs --- */
.modal-content input[type="email"],
.modal-content input[type="text"],
.modal-content input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin: 8px 0 15px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

/* --- Form Submit Button --- */
.modal-content button[type="submit"] {
  width: 100%;
  padding: 10px;
  background: #08624a;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: 0.2s;
}
.modal-content button[type="submit"]:hover {
  background: #003618;
}

/* --- FadeIn Animation --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Hidden Class --- */
.hidden {
  display: none !important;
}

/* --- Responsive --- */
@media screen and (max-width: 480px) {
  .modal-content {
    padding: 20px 15px;
  }
}


@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
/* 🌿 Responsive Design */


/* 📱 Responsive */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    border-radius: 0;
  }
  .image-section {
    height: 200px;
  }
  .image-section img {
    object-fit: cover;
    height: 100%;
    object-position: center top;
  }
  .form-section {
    padding: 32px 20px;
  }
}
@media (max-width: 600px) {
  .auth-wrapper { padding: 16px; }
  .main-container { border-radius: 16px; }
  .form-section { padding: 24px 16px; }
  .input-group input, .input-group select { font-size: 15px; }
}
@media (max-width: 480px) {
  .auth-wrapper { padding: 12px; }
  .image-section { height: 180px; }
  .form-section { padding: 20px 14px; }
  .form-box { max-width: 100%; }
  .sign-in-btn { width: 100%; }
}
@media (max-width: 360px) {
  .auth-wrapper { padding: 8px; }
  .main-container { border-radius: 12px; }
  .form-section { padding: 18px 12px; }
}
