*,
*::before,
*::after {
  box-sizing: border-box;
}

.auth-body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  font-family: 'Montserrat', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.login-page {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  background: #ffffff;
  overflow: hidden;
}

.login-form-panel {
  flex: 1 1 732px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  min-height: 100vh;
}

.login-form-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 676px;
}

.login-logo {
  width: 281px;
  height: 281px;
  object-fit: contain;
  margin-bottom: 18px;
}

.login-title {
  width: 100%;
  margin: 0 0 24px;
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 36px;
  text-align: center;
  color: #374151;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  padding-bottom: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.login-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  color: #374151;
}

.login-forgot {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  color: #f23347;
  text-decoration: underline;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.login-forgot:hover {
  opacity: 0.8;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: #f8f9fa;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  color: #374151;
  outline: none;
  transition: box-shadow 0.2s ease;
}

.login-input::placeholder {
  color: #9ca3af;
}

.login-input:focus {
  box-shadow: 0 0 0 2px rgba(27, 67, 50, 0.25);
}

.login-password-wrap {
  position: relative;
  width: 100%;
}

.login-input--password {
  padding: 14px 48px 14px 44px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.login-input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.login-input-icon--left {
  left: 16px;
}

.login-password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.login-password-toggle:hover {
  opacity: 0.75;
}

.login-password-toggle .hidden {
  display: none;
}

.hidden {
  display: none;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 61px;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  background: #1b4332;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 29px;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.login-submit:hover {
  background: #163728;
}

.login-submit:active {
  transform: translateY(1px);
}

.login-image-panel {
  position: relative;
  flex: 0 0 708px;
  width: 708px;
  max-width: 49.17%;
  min-height: 100vh;
  overflow: hidden;
  border-radius: 64px 0 0 64px;
  isolation: isolate;
}

.login-side-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.login-image-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.2) 35%,
      rgba(0, 0, 0, 0.55) 70%,
      rgba(0, 0, 0, 0.88) 100%
    );
  border-radius: 64px 0 0 64px;
  pointer-events: none;
}

.login-role-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(23, 21, 21, 0.6);
}

.login-role-overlay.is-hidden {
  display: none;
}

.login-role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 740px;
  min-height: 333px;
  padding: 48px 32px 40px;
  background: #ffffff;
  border-radius: 32px;
  box-shadow: 0 30px 45px 10px rgba(22, 22, 22, 0.15);
}

.login-role-close {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.login-role-close:hover {
  opacity: 0.65;
}

.login-role-title {
  margin: 8px 0 0;
  font-family: 'Lora', serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 36px;
  text-align: center;
  color: #000000;
}

.login-role-actions {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 676px;
}

.login-role-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 68px;
  padding: 16px 24px;
  border: none;
  border-radius: 32px;
  background: #1b4332;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 29px;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.login-role-btn:hover {
  background: #163728;
}

.login-role-btn:active {
  transform: translateY(1px);
}

.auth-body.modal-open {
  overflow: hidden;
}

.auth-form-modal {
  min-height: auto;
  gap: 16px;
}

.auth-modal-desc {
  margin: 0;
  max-width: 520px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  color: #6d717f;
}

.auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 676px;
}

.auth-switch {
  margin: 0;
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  color: #374151;
}

.auth-switch a {
  font-weight: 700;
  color: #1b4332;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.auth-switch a:hover {
  opacity: 0.8;
}

.login-forgot {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.auth-resend-btn {
  border: none;
  padding: 0;
  background: transparent;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  color: #f23347;
  text-decoration: underline;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.auth-resend-btn:hover {
  opacity: 0.8;
}

.otp-input {
  letter-spacing: 0.25em;
  text-align: center;
  font-family: 'Inter', sans-serif;
}

@media (max-width: 1200px) {
  .login-form-panel {
    flex: 1 1 55%;
    padding: 24px;
  }

  .login-image-panel {
    flex: 0 0 45%;
    width: 45%;
    max-width: 45%;
  }

  .login-logo {
    width: 220px;
    height: 220px;
  }

  .login-title {
    font-size: 24px;
    line-height: 32px;
  }

  .login-submit {
    font-size: 20px;
    line-height: 26px;
    min-height: 56px;
  }
}

@media (max-width: 1023px) {
  .login-page {
    flex-direction: column;
    min-height: auto;
  }

  .login-image-panel {
    order: -1;
    flex: none;
    width: 100%;
    max-width: 100%;
    height: 280px;
    min-height: 280px;
    border-radius: 0 0 32px 32px;
  }

  .login-image-gradient {
    border-radius: 0 0 32px 32px;
  }

  .login-form-panel {
    flex: none;
    width: 100%;
    min-height: auto;
    padding: 32px 24px 48px;
  }

  .login-form-inner {
    max-width: 480px;
  }

  .login-logo {
    width: 180px;
    height: 180px;
    margin-bottom: 12px;
  }

  .login-title {
    font-size: 22px;
    line-height: 30px;
    margin-bottom: 20px;
  }

  .login-form {
    gap: 20px;
  }

  .login-submit {
    font-size: 18px;
    line-height: 24px;
    min-height: 52px;
  }
}

@media (max-width: 480px) {
  .login-form-panel {
    padding: 24px 16px 40px;
  }

  .login-image-panel {
    height: 220px;
    min-height: 220px;
    border-radius: 0 0 24px 24px;
  }

  .login-image-gradient {
    border-radius: 0 0 24px 24px;
  }

  .login-logo {
    width: 140px;
    height: 140px;
  }

  .login-title {
    font-size: 20px;
    line-height: 28px;
  }

  .login-label,
  .login-forgot {
    font-size: 14px;
    line-height: 18px;
  }

  .login-input,
  .login-input--password {
    height: 44px;
    font-size: 14px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .login-input--password {
    padding-left: 40px;
    padding-right: 44px;
  }

  .login-password-toggle {
    width: 44px;
    height: 44px;
  }

  .login-submit {
    font-size: 16px;
    line-height: 22px;
    min-height: 48px;
    padding: 14px 20px;
  }

  .login-role-card {
    max-width: 100%;
    min-height: auto;
    padding: 40px 20px 32px;
    border-radius: 24px;
  }

  .login-role-title {
    font-size: 22px;
    line-height: 30px;
  }

  .login-role-btn {
    min-height: 56px;
    font-size: 18px;
    line-height: 24px;
    border-radius: 28px;
  }

  .login-role-close {
    top: 16px;
    right: 16px;
  }

  .auth-switch,
  .auth-modal-desc,
  .auth-resend-btn {
    font-size: 14px;
    line-height: 18px;
  }
}
