.back-home {
  display: flex;
  justify-content: flex-end;   /* right side lo kanipistundi */
  margin-bottom: 3px;
  margin-top: 3px;
}

.back-home a {
  font-size: 0.95rem;
  color: #8b6b5a;       /* slightly lighter */
  opacity: 0.9;
}
.back-home a:hover {
  text-decoration: underline;
  opacity: 1;
}

.back-home a i {
  margin-right: 4px;
}

/* ===============================================
   ✅ RESET & GLOBAL STYLES
================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===============================================
   ✅ BODY
================================================= */
body {
  font-family: Arial, sans-serif;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  background: rgba(237, 202, 169, 0.8);
  transition: all 0.3s ease-in-out;
}

/* ===============================================
   ✅ MAIN CONTAINER
================================================= */
.login-container {
  display: flex;
  width: 90%;
  max-width: 1200px;
  height: 95vh;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
   background: #fff; 
  transition: all 0.3s ease-in-out;
}

/* ===============================================
   ✅ LEFT IMAGE SIDE
================================================= */
.login-image {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; 
  background: #fdf8f6;
}

.login-image img {
  width: 100%;
  height: 110%;
  object-fit: cover;
  animation: float 4s infinite ease-in-out;
  transition: all 0.3s ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Quote text overlay */
.login-quote {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 15px 20px;
  border-radius: 10px;
  max-width: 80%;
  text-align: center;
  font-style: italic;
  color: #6d4c41;
  font-size: 1.1rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: all 0.3s ease-in-out;
}

/* ===============================================
   ✅ RIGHT FORM SIDE
================================================= */
.login-form {
  flex: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 15px 40px 15px;
  transition: all 0.3s ease-in-out;

  /* ⭐ Add these 3 lines */
  overflow-y: auto;
  max-height: 100vh; 
  scrollbar-width: thin; /* optional */
}

.login-form h2 {
  font-size: 2rem;
  color: #6d4c41;
  margin-bottom: 5px;
  margin-top:-10px;
}

.login-form p {
  color: #8d6e63;
  margin-bottom: 20px;
}

/* ===============================================
   ✅ INPUT FIELDS & TOGGLE
================================================= */
.input-group {
  margin-bottom: 15px;
  margin-top:-5px;
  position: relative;
}

.input-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: #5d4037;
}

.input-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #a1887f;
  border-radius: 8px;
  outline: none;
  transition: all 0.3s ease-in-out;
  height: 40px;
  padding-right: 40px; /* space for eye icon */
}

.input-group input:focus {
  border-color: #7b5e54;
}

/* Password toggle (eye icon) */
.password-toggle {
  position: absolute;
  top: 60%;
  right: 12px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: #555;
  line-height: 1;
}
.password-toggle:hover {
  color: #000;
}

/* ===============================================
   ✅ ERROR & SUCCESS STYLES
================================================= */
.error {
  color: red;
  font-size: 0.85rem;
  margin-top: 3px;
}
input.error-input {
  border-color: red;
}

.success-message {
  margin-top: 10px;
  margin-bottom:5px;
  font-size: 1rem;
  font-weight: bold;
  color: green;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: none;
}
.success-message.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.success-message.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

/* Disabled states */
input:disabled {
  background-color: #f0f0f0;
  cursor: not-allowed;
}
button:disabled {
  cursor: not-allowed;
}

/* Spinner animation inside button */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===============================================
   ✅ BUTTONS
================================================= */
.btn {
  width: 100%;
  padding: 12px;
  background: #7b5e54;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 10px;
  margin-bottom:5px;
  transition: all 0.3s ease-in-out;
}
.btn:hover {
  background: #5d4037;
}

.or-divider {
  text-align: center;
  margin: 20px 0;
  color: #757575;
}

/* Google button */
.google-btn {
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  gap: 10px;
  transition: all 0.3s ease-in-out;
}
.google-btn img {
  width: 20px;
  height: 20px;
}

/* Sign-up link */
.signup-link {
  text-align: center;
  color: #5d4037;
  margin-top: 20px;
}

.signup-link a {
  color: #8d6e63;
  text-decoration: none;
  font-weight: bold;
}
.signup-link a:hover {
  text-decoration: underline;
}

/* ===============================================
   ✅ RESPONSIVENESS
================================================= */

/* Large tablets (<= 992px) */
@media (max-width: 992px) {
  .login-container {
    width: 95%;
    height: auto;
    flex-direction: row;
  }
  .login-form {
    padding: 40px 30px;
  }
  .login-form h2 {
    font-size: 1.8rem;
  }
  .login-quote {
    font-size: 1rem;
  }
}

/* Tablets & small laptops (<= 768px) */
@media (max-width: 768px) {
  body {
    height: auto;
    align-items: flex-start;
    overflow-y: auto;
  }
  .login-container {
    flex-direction: column;
    width: 95%;
    height: auto;
    margin: 30px 0;
  }
  .login-image,
  .login-form {
    width: 100%;
    flex: unset;
    border-radius: 0;
  }
  .login-image {
    height: 250px;
  }
  .login-quote {
    font-size: 0.95rem;
    padding: 10px 15px;
  }
  .login-form {
    padding: 30px 20px;
  }
  .login-form h2 {
    font-size: 1.6rem;
  }
  .login-form p {
    font-size: 0.9rem;
  }
  .btn,
  .google-btn {
    font-size: 0.95rem;
    padding: 10px;
  }
}

/* Small phones (<= 480px) */
@media (max-width: 480px) {
  .login-form {
    padding: 25px 15px;
  }
  .login-form h2 {
    font-size: 1.4rem;
  }
  .login-form p {
    font-size: 0.85rem;
  }
  .login-quote {
    font-size: 0.85rem;
    padding: 8px 10px;
  }
  .btn,
  .google-btn {
    font-size: 0.9rem;
  }
  .input-group input {
    padding: 9px;
  }
  .password-toggle {
    right: 10px;
    font-size: 16px;
  }
  .or-divider {
    margin: 10px 0;
  }
}
