@import '~@/baseStyle.less';

// 登录页面整体布局
.login-page {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 100vh;
  padding-right: 10%;
  background: #f0f2f5;
  background-image: url('~@/assets/img/loginBg.jpg');
  background-position: center;
  background-size: cover;
}

// 登录容器
.login-container {
  position: relative;
  width: 400px;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

// 标题样式
.login-title {
  margin-bottom: 20px;
  color: @main-color;
  font-weight: bold;
  font-size: 24px;
  text-align: center;
}

// 返回首页链接
.back-home {
  position: absolute;
  top: 10px;
  left: 10px;

  a {
    display: flex;
    align-items: center;
    color: @main-color;
    font-size: 14px;

    &:hover {
      color: lighten(@main-color, 10%);
    }

    .anticon {
      margin-right: 4px;
    }
  }
}

// Tab 容器
.login-tab-container {
  margin-bottom: 30px;
}

// Tab 样式
.login-tabs {
  border-radius: 15px;
  .ant-tabs-nav {
    margin: 0;
  }

  .ant-tabs-nav::before {
    display: none;
  }

  .ant-tabs-tab {
    flex: 1;
    height: 44px;
    margin: 0;
    padding: 0;
    font-weight: bold;
    font-size: 16px;
    line-height: 44px;
    text-align: center;
    background-color: #f5f5f5;
    border: none;
    transition: none;

    .ant-tabs-tab-btn {
      width: 100%;
      height: 100%;
      color: #333;
    }
  }

  .ant-tabs-nav-list {
    display: flex;
    width: 100%;
    overflow: hidden;
  }

  .ant-tabs-tab-active {
    background-color: @main-color;
    border-radius: 15px;

    .ant-tabs-tab-btn {
      color: #fff !important;
      font-weight: bold;
    }
  }

  .ant-tabs-ink-bar {
    display: none;
  }
}

// 登录表单
.login-form {
  .ant-form-item {
    margin-bottom: 20px;
  }

  .ant-input-affix-wrapper {
    border-radius: 10px;

    &:focus,
    &-focused,
    &:hover {
      border-color: @main-color;
    }
  }
}

// 登录选项区域（记住密码和忘记密码）
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;

  .ant-checkbox-checked .ant-checkbox-inner {
    background-color: @main-color;
    border-color: @main-color;
  }

  .login-form-forgot {
    color: @main-color;

    &:hover {
      color: lighten(@main-color, 10%);
    }
  }
}

// 登录按钮
.login-form-button {
  width: 100%;
  height: 40px;
  margin-top: 10px;
  background-color: @main-color;
  border-color: @main-color;
  border-radius: 4px;

  &:hover,
  &:focus {
    background-color: lighten(@main-color, 10%);
    border-color: lighten(@main-color, 10%);
  }
}

// 注册链接
.register-link {
  margin-top: 15px;
  text-align: center;

  a {
    margin-left: 5px;
    color: @main-color;

    &:hover {
      color: lighten(@main-color, 10%);
    }
  }
}

// 响应式布局
@media (max-width: 768px) {
  .login-page {
    justify-content: center;
    padding-right: 0;
  }

  .login-container {
    width: 90%;
    max-width: 400px;
    padding: 20px;
  }
}
