/* Login Page Styles — harmonized with onboarding_account */

.login-main {
  padding-top: 160px;
  padding-bottom: 60px;
  min-height: 100vh;
  background: #F9F7F5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 848px;
  margin: 0 auto;
}

.login-card {
  background: #FFFFFF;
  box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.10);
  border-radius: 30px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

/* Left Section */
.login-left {
  padding: 0 37px 0 51px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: #252A34;
  margin: 0 0 38px 0;
  line-height: 34px;
  font-family: 'Chewie DEMO';
}

/* Google Button — same as onboarding */
.login-left .btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 12px 25px;
  background: transparent;
  border: 1px solid #E8E0D6;
  border-radius: 15px;
  color: #5E6678;
  font-family: 'Chewie DEMO';
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  position: relative;
}

.login-left .btn-google span {
  flex: 1;
  text-align: center;
}

.login-left .btn-google:hover {
  border-color: #ECA455;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(236, 164, 85, 0.2);
}

/* Divider — same as onboarding */
.login-left .divider {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 12px 0;
}

.login-left .divider-line {
  flex: 1;
  height: 1px;
  background: #EDE8E2;
}

.login-left .divider-text {
  font-size: 12px;
  color: #A19895;
  font-weight: 500;
  white-space: nowrap;
}

/* Flash error banner */
.login-error-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFF5F5;
  border: 1px solid #FEB2B2;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #C53030;
  font-weight: 500;
  animation: shakeX 0.5s ease;
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* Login Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.login-form .form-label {
  font-size: 12px;
  font-weight: 500;
  color: #181514;
  font-family: 'Chewie DEMO';
}

/* Input wrapper for icons inside input */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-form .form-input {
  border-radius: 16px;
  border: 1px solid #EDE8E2;
  padding: 0.875rem 2.5rem 0.875rem 1rem;
  height: 46px;
  background: #F6F6F6;
  font-size: 14px;
  font-weight: 500;
  color: #5E6678;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.login-form .form-input:focus {
  outline: none;
  border-color: #ECA455;
}

.login-form .form-input::placeholder {
  color: #BDC0C5;
}

.login-form .form-input:hover {
  border-color: #ECA455;
}

.login-form .form-input.input-error {
  border-color: #E53E3E;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.08);
}

.login-form .form-input.input-valid {
  border-color: #38A169;
}

/* Validation icons */
.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  pointer-events: none;
}

.input-icon.visible {
  display: flex;
}

/* Toggle password visibility */
.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover svg {
  stroke: #252A34;
}

/* Form error messages */
.form-error {
  font-size: 11px;
  color: #E53E3E;
  font-weight: 500;
  display: none;
  padding-left: 4px;
}

.form-error.visible {
  display: block;
}

/* Remember me & Forgot password */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 0;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #5E6678;
  cursor: pointer;
  user-select: none;
}

.remember-me input[type="checkbox"] {
  display: none;
}

.remember-me .checkmark {
  width: 18px;
  height: 18px;
  border: 1.5px solid #EDE8E2;
  border-radius: 5px;
  background: #F6F6F6;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remember-me input[type="checkbox"]:checked + .checkmark {
  background: #ECA455;
  border-color: #ECA455;
}

.remember-me input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.forgot-password {
  font-size: 13px;
  color: #ECA455;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.forgot-password:hover {
  color: #d4903d;
  text-decoration: underline;
}

/* Login Button */
.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 25px;
  border: 1px solid #252A34;
  border-radius: 15px;
  background: #ECA455;
  color: #252A34;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Chewie DEMO';
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 18px;
  width: 100%;
  opacity: 0.6;
}

.btn-login:not(:disabled) {
  opacity: 1;
  cursor: pointer;
}

.btn-login:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(236, 164, 85, 0.3);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  cursor: not-allowed;
}

.btn-login:focus {
  outline: 1px solid #ECA455;
}

/* Loader inside button */
.btn-login-loader {
  display: flex;
  align-items: center;
}

/* Sign up link */
.signup-text {
  font-size: 13px;
  color: #A19895;
  text-align: center;
  margin-top: 23px;
}

.signup-link {
  color: #ECA455;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.signup-link:hover {
  color: #d4903d;
  text-decoration: underline;
}

/* Right Section — same as onboarding */
.login-right {
  background: linear-gradient(91deg, #FFF 0.76%, #E8E0D6 47.02%, #DCE1EB 105.6%);
  border-left: 1px solid #E8E0D6;
  padding: 38px 45px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
  gap: 23px;
}

.login-img {
  max-width: 100%;
  height: auto;
  max-height: 200px;
}

.login-subtitle {
  font-size: 28px;
  font-weight: 700;
  color: #2C3342;
  font-family: 'Chewie DEMO';
  margin: 0;
  line-height: 42px;
}

.login-right .features-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 400px;
}

.login-right .feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.login-right .feature-item span {
  font-size: 13px;
  color: #2C3342;
  font-weight: 500;
  line-height: 24px;
}

/* Animations */
.login-form .form-group {
  opacity: 0;
  transform: translateY(20px);
  animation: loginSlideIn 0.6s ease forwards;
}

.login-form .form-group:nth-child(2) {
  animation-delay: 0.05s;
}

.login-form .form-group:nth-child(3) {
  animation-delay: 0.1s;
}

.form-options {
  opacity: 0;
  transform: translateY(20px);
  animation: loginSlideIn 0.6s ease forwards;
  animation-delay: 0.15s;
}

.btn-login {
  opacity: 0;
  transform: translateY(20px);
  animation: loginSlideIn 0.6s ease forwards;
  animation-delay: 0.2s;
}

@keyframes loginSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* re-apply disabled opacity after animation */
.btn-login:disabled {
  animation: loginSlideInDisabled 0.6s ease forwards;
  animation-delay: 0.2s;
}

@keyframes loginSlideInDisabled {
  to {
    opacity: 0.6;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .login-container {
    max-width: 700px;
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .login-right {
    order: -1;
    padding: 2rem 2.5rem;
    border-left: none;
    border-top: 1px solid #E8E0D6;
  }

  .login-left {
    padding: 2rem 2.5rem;
  }

  .login-title {
    font-size: 2rem;
    text-align: center;
  }

  .login-subtitle {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .login-main {
    padding: 16px;
    padding-top: 100px;
    padding-bottom: 24px;
  }

  .login-card {
    border-radius: 16px;
    min-height: auto;
  }

  .login-left {
    padding: 20px 16px;
  }

  .login-right {
    padding: 16px;
    gap: 14px;
  }

  .login-title {
    font-size: 20px;
    margin-bottom: 20px;
    line-height: 28px;
  }

  .login-subtitle {
    font-size: 18px;
    line-height: 26px;
  }

  .login-img {
    max-height: 120px;
  }

  .login-right .features-list {
    gap: 8px;
  }

  .login-right .feature-item span {
    font-size: 12px;
    line-height: 20px;
  }

  .login-left .btn-google {
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 12px;
  }

  .login-left .divider {
    margin: 10px 0;
  }

  .login-form .form-input {
    height: 42px;
    padding: 0.75rem 2.25rem 0.75rem 0.875rem;
    font-size: 13px;
    border-radius: 12px;
  }

  .btn-login {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 12px;
    margin-top: 14px;
  }

  .signup-text {
    margin-top: 16px;
    font-size: 12px;
  }

  .form-options {
    flex-direction: row;
    gap: 0;
  }

  .remember-me {
    font-size: 12px;
  }

  .forgot-password {
    font-size: 12px;
  }

  .login-error-banner {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 10px;
  }
}

@media (max-width: 380px) {
  .login-right {
    padding: 14px 16px;
  }

  .login-img {
    max-height: 100px;
  }

  .login-subtitle {
    font-size: 16px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

